Compare commits

...

6 Commits

Author SHA1 Message Date
cravl-dev
affa06fead Merge 08786d64e8 into 8e7d4db988 2024-01-26 23:11:49 +01:00
Anna
8e7d4db988 fix: OctoPrint logo in README.md (#424)
* Fix OctoPrint logo in Readme

Fixed the broken link to the OctoPrint logo in the Readme under the Sources section. Now uses the logo present in the octoprint docs directory.

* Update OctoPrint logo to "raw" cdn link

* Changed ?raw=true link to raw.githubusercontent.com

---------

Co-authored-by: dw-0 <th33xitus@gmail.com>
2024-01-23 22:47:37 +01:00
jneilliii
8f960495ba fix: OctoPrint logo in README.md (#423) 2024-01-22 17:57:37 +01:00
Cameron Ryder
08786d64e8 fix: don't block user and check more than home 2023-06-28 14:45:33 -04:00
cravl-dev
a976e60ffd Merge branch 'th33xitus:master' into fix-331 2023-06-28 14:44:45 -04:00
Cameron Ryder
3099a6c9fb feat: add free disk space startup check (#331) 2023-06-08 11:45:32 -04:00
3 changed files with 25 additions and 1 deletions

View File

@@ -125,7 +125,7 @@ prompt and confirm by hitting ENTER.
<tr> <tr>
<th><img src="https://raw.githubusercontent.com/fluidd-core/fluidd/master/docs/assets/images/logo.svg" alt="Fluidd Logo" height="64"></th> <th><img src="https://raw.githubusercontent.com/fluidd-core/fluidd/master/docs/assets/images/logo.svg" alt="Fluidd Logo" height="64"></th>
<th><img src="https://avatars.githubusercontent.com/u/31575189?v=4" alt="jordanruthe avatar" height="64"></th> <th><img src="https://avatars.githubusercontent.com/u/31575189?v=4" alt="jordanruthe avatar" height="64"></th>
<th><img src="https://camo.githubusercontent.com/627be7fc67195b626b298af9b9677d7c58e698c67305e54324cffbe06130d4a4/68747470733a2f2f6f63746f7072696e742e6f72672f6173736574732f696d672f6c6f676f2e706e67" alt="OctoPrint Logo" height="64"></th> <th><img src="https://raw.githubusercontent.com/OctoPrint/OctoPrint/master/docs/images/octoprint-logo.png" alt="OctoPrint Logo" height="64"></th>
</tr> </tr>
<tr> <tr>
<th>by <a href="https://github.com/fluidd-core">fluidd-core</a></th> <th>by <a href="https://github.com/fluidd-core">fluidd-core</a></th>

View File

@@ -82,6 +82,7 @@ function kiauh_update_dialog() {
} }
check_euid check_euid
check_free_space
init_logfile init_logfile
set_globals set_globals
kiauh_update_dialog kiauh_update_dialog

View File

@@ -28,6 +28,29 @@ function check_euid() {
fi fi
} }
function check_free_space() {
local mount_free mb_rec=2048
local mount_check_regex='^/($|bin|etc|home|lib|mnt|opt|root|sbin|tmp|usr|var)' # all root dirs possibly relevant to software install
for mount_check in $(cat /etc/mtab | grep '^/dev' | cut -d ' ' -f 2 | grep -E '${mount_check_regex}'); do
mount_free=$(($(df -Pk ${mount_check} | sed 1d | grep -v used | awk '{ print $4 "\t" }')/1024))
if [[ ${mount_free} -lt ${mb_req} ]]; then
local yn
while true; do
echo -e "${yellow}Heads up! Free disk space in ${white}${mount_check}${yellow} is only ${white}${mount_free} MB${yellow}.${white}"
read -p "${yellow}You may run into errors installing or updating software that uses this mountpoint. Proceed? (y|N): ${white}" yn
case "${yn}" in
Y|y|Yes|yes)
break;;
N|n|No|no|"")
exit 1;;
*)
echo -e "${red}Please answer "y" or "n"${white}";;
esac
done
fi
done
}
#================================================# #================================================#
#============= MESSAGE FORMATTING ===============# #============= MESSAGE FORMATTING ===============#
#================================================# #================================================#