]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Rename etc/periodic/daily/430.status-rwho to periodic/daily/430.status-uptime
authorngie <ngie@FreeBSD.org>
Mon, 2 Nov 2015 01:05:34 +0000 (01:05 +0000)
committerngie <ngie@FreeBSD.org>
Mon, 2 Nov 2015 01:05:34 +0000 (01:05 +0000)
The command was checking local/remote system uptime, so rename the script to
match its function and to avoid confusion

The controlling variable in /etc/periodic.conf has been renamed from
daily_status_rwho_enable to daily_status_uptime_enable.

MFC after: 3 days
Reported by: Peter Jeremy <peter@rulingia.com>
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division

ObsoleteFiles.inc
etc/defaults/periodic.conf
etc/periodic/daily/430.status-rwho [deleted file]
etc/periodic/daily/430.status-uptime [new file with mode: 0755]
etc/periodic/daily/Makefile
tools/build/mk/OptionalObsoleteFiles.inc

index ea7d02fdbe1dcab8b7703c1dfc6f6821577b7347..78f6aab8794d4f5e8331e26a0fe49ca272c87994 100644 (file)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151101: 430.status-rwho was renamed to 430.status-uptime
+OLD_FILES+=etc/periodic/daily/430.status-rwho
 # 20151030: OpenSSL 1.0.2d import
 OLD_FILES+=usr/share/openssl/man/man3/CMS_set1_signer_certs.3.gz
 OLD_FILES+=usr/share/openssl/man/man3/EVP_PKEY_ctrl.3.gz
index fbc5d0ae1ebd766d58e269539acc5f8c67b11867..855d5609cb84f5a81a503e841f8e3e4a3e6669cb 100644 (file)
@@ -115,8 +115,8 @@ daily_status_network_enable="YES"                   # Check network status
 daily_status_network_usedns="YES"                      # DNS lookups are ok
 daily_status_network_netstat_flags="-d"                        # netstat(1) flags
 
-# 430.status-rwho
-daily_status_rwho_enable="YES"                         # Check system status
+# 430.status-uptime
+daily_status_uptime_enable="YES"                       # Check system uptime
 
 # 440.status-mailq
 daily_status_mailq_enable="YES"                                # Check mail status
diff --git a/etc/periodic/daily/430.status-rwho b/etc/periodic/daily/430.status-rwho
deleted file mode 100755 (executable)
index 4476136..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# If there is a global system configuration file, suck it in.
-#
-if [ -r /etc/defaults/periodic.conf ]
-then
-    . /etc/defaults/periodic.conf
-    source_periodic_confs
-fi
-
-case "$daily_status_rwho_enable" in
-    [Yy][Ee][Ss])
-       rwho=$(echo /var/rwho/*)
-        if [ -f "${rwho%% *}" ]
-        then
-           echo ""
-           echo "Local network system status:"
-           prog=ruptime
-       else
-           echo ""
-           echo "Local system status:"
-           prog=uptime
-       fi
-       rc=$($prog | tee /dev/stderr | wc -l)
-       if [ $? -eq 0 ]
-       then
-           [ $rc -gt 1 ] && rc=1
-       else
-           rc=3
-       fi;;
-
-    *)  rc=0;;
-esac
-
-exit $rc
diff --git a/etc/periodic/daily/430.status-uptime b/etc/periodic/daily/430.status-uptime
new file mode 100755 (executable)
index 0000000..0c8c591
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+    . /etc/defaults/periodic.conf
+    source_periodic_confs
+fi
+
+case "$daily_status_uptime_enable" in
+    [Yy][Ee][Ss])
+       rwho=$(echo /var/rwho/*)
+        if [ -f "${rwho%% *}" ]
+        then
+           echo ""
+           echo "Local network system status:"
+           prog=ruptime
+       else
+           echo ""
+           echo "Local system status:"
+           prog=uptime
+       fi
+       rc=$($prog | tee /dev/stderr | wc -l)
+       if [ $? -eq 0 ]
+       then
+           [ $rc -gt 1 ] && rc=1
+       else
+           rc=3
+       fi;;
+
+    *)  rc=0;;
+esac
+
+exit $rc
index 15b6ae8a80e6ced191c9976e16001c5d435d773f..939dd150e4a9438675e64dbacba00ee5f565ff17 100644 (file)
@@ -15,6 +15,7 @@ FILES=        100.clean-disks \
        408.status-gstripe \
        409.status-gconcat \
        420.status-network \
+       430.status-uptime \
        450.status-security \
        510.status-world-kernel \
        999.local
@@ -38,8 +39,7 @@ FILES+=       480.status-ntpd
 .endif
 
 .if ${MK_RCMDS} != "no"
-FILES+=        140.clean-rwho \
-       430.status-rwho
+FILES+=        140.clean-rwho
 .endif
 
 .if ${MK_SENDMAIL} != "no"
index 50fd4ed244bd8db550a8ca6686a154be1d09afd8..60859a4c576b20659d48dc9887c2bf449b521e96 100644 (file)
@@ -6517,8 +6517,7 @@ OLD_FILES+=usr/share/man/man8/repquota.8.gz
 .if ${MK_RCMDS} == no
 OLD_FILES+=bin/rcp
 OLD_FILES+=etc/rc.d/rwho
-OLD_FILES+=etc/periodic/daily/140.clean-rwho 
-OLD_FILES+=etc/periodic/daily/430.status-rwho
+OLD_FILES+=etc/periodic/daily/140.clean-rwho
 OLD_FILES+=rescue/rcp
 OLD_FILES+=usr/bin/rlogin
 OLD_FILES+=usr/bin/rsh