Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Don't print "Last dump" report if /etc/dumpdates is zero...



details:   https://anonhg.NetBSD.org/src/rev/f95ce9f61cd4
branches:  trunk
changeset: 556101:f95ce9f61cd4
user:      perry <perry%NetBSD.org@localhost>
date:      Sun Dec 07 16:35:04 2003 +0000

description:
Don't print "Last dump" report if /etc/dumpdates is zero length or absent.
Don't print OTP/skey report if /etc/skeyskeys is zero length or absent.

diffstat:

 etc/daily |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 92d76d6c727c -r f95ce9f61cd4 etc/daily
--- a/etc/daily Sun Dec 07 16:20:18 2003 +0000
+++ b/etc/daily Sun Dec 07 16:35:04 2003 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: daily,v 1.51 2003/12/07 16:20:18 perry Exp $
+#      $NetBSD: daily,v 1.52 2003/12/07 16:35:04 perry Exp $
 #      @(#)daily       8.2 (Berkeley) 1/25/94
 #
 
@@ -141,7 +141,9 @@
 
 if checkyesno check_disks; then
        df -hi > $TMP 
-       dump -W > $TMP2
+       if [ -s /etc/dumpdates ] ; then
+               dump -W > $TMP2
+       fi
        if [ -s $TMP -o -s $TMP2 ]; then
                echo ""
                echo "Checking subsystem status:"
@@ -242,9 +244,11 @@
 fi
 
 if checkyesno run_skeyaudit; then
-       echo ""
-       echo "Checking remaining s/key OTPs:"
-       skeyaudit
+       if [ -s /etc/skeykeys ]; then
+               echo ""
+               echo "Checking remaining s/key OTPs:"
+               skeyaudit
+       fi
 fi
 
 if [ -f /etc/daily.local ]; then



Home | Main Index | Thread Index | Old Index