-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add server disk space check for mounted share when capturing an image…
…, thanks to rluzuriaga Resolves #60
- Loading branch information
1 parent
5fdea7d
commit 8b29992
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.checkmountdrivesize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
dots "Checking Server Disk Space" | ||
getServerDiskSpaceUsage=$(df -h | grep "/images" | sed -n '/dev/{s/ */ /gp}') | ||
echo "Done" | ||
|
||
dots "Server Disk Size Total" | ||
serverDiskSizeTotal=$(echo "$getServerDiskSpaceUsage" | cut -d ' ' -f2) | ||
echo "$serverDiskSizeTotal" | ||
|
||
dots "Server Disk Size Used" | ||
serverDiskSizeUsed=$(echo "$getServerDiskSpaceUsage" | cut -d ' ' -f3) | ||
echo "$serverDiskSizeUsed" | ||
|
||
dots "Server Disk Size Used Percentage" | ||
serverDiskSizeUsedPercent=$(echo "$getServerDiskSpaceUsage" | cut -d ' ' -f5) | ||
echo "$serverDiskSizeUsedPercent" | ||
|
||
dots "Server Disk Size Available" | ||
serverDiskSizeAvailable=$(echo "$getServerDiskSpaceUsage" | cut -d ' ' -f4) | ||
[[ $serverDiskSizeAvailable == "0" ]] && serverDiskSizeAvailable="0M" | ||
echo "$serverDiskSizeAvailable" | ||
|
||
debugPause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters