From: Nicolas Boisselier Date: Sun, 17 Feb 2019 21:53:44 +0000 (+0000) Subject: etc/profile.d/sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=324a8e57c18a7de783d790fdf21d47adaeea3e58;p=nb.git etc/profile.d/sys.sh --- diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 47e87a15..925011ff 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -42,14 +42,15 @@ sys_arch() { sys_df() { df -k -l | tail -n +2 | while read -r -a i; do mount=${i[0]} - # On docker root / mount point is "none" - [ -e "$mount" -o "$mount" = "/" ] || continue used=${i[2]} free=${i[3]} pcent=${i[4]} pcent=${pcent//%/} dir=${i[5]} + # On docker root / mount point is "none" + [ -e "$mount" -o "$dir" = "/" ] || continue + # NB 12.12.17 inodes=($(df -P -l "$dir" | tail -n +2)) # NB 12.12.17 iused=${inodes[2]} # NB 12.12.17 ifree=${inodes[3]}