Hello Nick,
> Those of us that don't worry about running out of inodes, we can
> set DF_FLAGS in /etc/daily.local to be whatever we want, in my
> case, I like "-hl" (currently, it's "-ikl")
I really like the idea, because getting human-readable numbers in the
report without replicating functionality in daily.local or overwriting
the daily script is very much appreciated.
Initially I only wanted to add the manual bits to your diff but noticed
two other things I'd like to improve on. Hope you don't mind.
- For consistency with the existing MAKEWHATISARGS variable in weekly,
name the variable DFARGS.
- Use variable substitution, allowing for zero arguments (variable set
but empty) and basically behave like MAKEWHATISARGS.
Regards,
Andre
Index: src/etc/daily
===================================================================
RCS file: /cvs/src/etc/daily,v
retrieving revision 1.93
diff -u -p -r1.93 daily
--- src/etc/daily 9 Sep 2019 20:02:26 -0000 1.93
+++ src/etc/daily 28 Oct 2019 13:20:21 -0000
@@ -140,7 +140,7 @@ next_part "Checking subsystem status:"
if [ "X$VERBOSESTATUS" != X0 ]; then
echo ""
echo "disks:"
- df -ikl
+ df ${DFARGS-"-ikl"}
echo ""
dump W
else
Index: src/share/man/man8/daily.8
===================================================================
RCS file: /cvs/src/share/man/man8/daily.8,v
retrieving revision 1.27
diff -u -p -r1.27 daily.8
--- src/share/man/man8/daily.8 13 Jul 2017 19:16:33 -0000 1.27
+++ src/share/man/man8/daily.8 28 Oct 2019 13:20:21 -0000
@@ -202,6 +202,11 @@ If set to 0, do not run
If set to 1, run
.Xr fsck 8
with the no-write flag.
+.It Ev DFARGS
+Arguments for
+.Xr df 1 ;
+defaults to
+.Dq Fl ikl .
.It Ev ROOTBACKUP
If set to 1, make a backup of the root file system.
.It Ev VERBOSESTATUS