Source-Changes-HG archive

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

[src/trunk]: src/etc Convert uses of test (ie: '[') to use only POSIX specifi...



details:   https://anonhg.NetBSD.org/src/rev/864efb923833
branches:  trunk
changeset: 433614:864efb923833
user:      kre <kre%NetBSD.org@localhost>
date:      Sun Sep 23 23:16:34 2018 +0000

description:
Convert uses of test (ie: '[') to use only POSIX specified forms,
just on general principle (all but 3 of the changes are in code that
is commented out...)

diffstat:

 etc/daily |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 61e93f33b3cc -r 864efb923833 etc/daily
--- a/etc/daily Sun Sep 23 23:12:21 2018 +0000
+++ b/etc/daily Sun Sep 23 23:16:34 2018 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: daily,v 1.92 2014/12/13 02:53:08 uebayasi Exp $
+#      $NetBSD: daily,v 1.93 2018/09/23 23:16:34 kre Exp $
 #      @(#)daily       8.2 (Berkeley) 1/25/94
 #
 
@@ -32,7 +32,7 @@
        exit 1;
 fi
 
-if [ -z "$MAILTO" -o "$USER" != "root" ]; then
+if [ -z "$MAILTO" ] || [ "$USER" != "root" ]; then
        MAILTO=root
 fi
 
@@ -50,14 +50,14 @@
 #
 #echo ""
 #echo "Removing scratch and junk files:"
-#if [ -d /tmp -a ! -h /tmp ]; then
+#if [ -d /tmp ] && ! [ -h /tmp ]; then
 #      cd /tmp && {
 #      find . -type f -atime +3 -exec rm -f -- {} \;
 #      find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
 #          >/dev/null 2>&1; }
 #fi
 
-#if [ -d /var/tmp -a ! -h /var/tmp ]; then
+#if [ -d /var/tmp ] && ! [ -h /var/tmp ]; then
 #      cd /var/tmp && {
 #      find . ! -name . -atime +7 -exec rm -f -- {} \;
 #      find . ! \( -name . -o -name vi.recover \) -type d \
@@ -66,14 +66,14 @@
 #fi
 
 # Additional junk directory cleanup would go like this:
-#if [ -d /scratch -a ! -h /scratch ]; then
+#if [ -d /scratch ] && ! [ -h /scratch ]; then
 #      cd /scratch && {
 #      find . ! -name . -atime +1 -exec rm -f -- {} \;
 #      find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
 #          >/dev/null 2>&1; }
 #fi
 
-#if [ -d /var/rwho -a ! -h /var/rwho ] ; then
+#if [ -d /var/rwho ] && ! [ -h /var/rwho ] ; then
 #      cd /var/rwho && {
 #      find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
 #fi
@@ -174,7 +174,7 @@
        if [ -s /etc/dumpdates ] ; then
                dump -W > $TMP2
        fi
-       if [ -s $TMP -o -s $TMP2 ]; then
+       if [ -s $TMP ] || [ -s $TMP2 ]; then
                echo ""
                echo "Checking subsystem status:"
                echo ""
@@ -307,7 +307,7 @@
 fi
 
 if checkyesno run_makemandb; then
-       if [ -f /etc/man.conf -a -x /usr/sbin/makemandb ]; then
+       if [ -f /etc/man.conf ] && [ -x /usr/sbin/makemandb ]; then
                echo ""
                echo "Updating man page index:"
                (umask 022; nice -n 5 /usr/sbin/makemandb -Q)



Home | Main Index | Thread Index | Old Index