[BACK]Return to daily CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/etc/daily between version 1.24 and 1.25

version 1.24, 1997/10/27 04:18:06 version 1.25, 1998/01/26 12:02:43
Line 5 
Line 5 
 #  #
   
 PATH=/bin:/usr/bin:/sbin:/usr/sbin  PATH=/bin:/usr/bin:/sbin:/usr/sbin
   export PATH
 host=`hostname`  host=`hostname`
 echo "Subject: $host daily run output"  echo "Subject: $host daily run output"
   
 umask 077  umask 077
   
   if [ -f /etc/rc.subr ]; then
           . /etc/rc.subr
   else
           echo "Can't read /etc/rc.subr; aborting."
           exit 1;
   fi
   
 if [ -z "$MAILTO" -o "$USER" != "root" ]; then  if [ -z "$MAILTO" -o "$USER" != "root" ]; then
   MAILTO=root    MAILTO=root
 fi  fi
Line 65  fi
Line 73  fi
 TMP=daily.$$  TMP=daily.$$
 TMP2=daily2.$$  TMP2=daily2.$$
   
 if [ "$find_core" != NO ] ; then  if checkyesno find_core; then
         find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \          find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \
                 -o -fstype kernfs -o -fstype procfs \) -a -prune -o \                  -o -fstype kernfs -o -fstype procfs \) -a -prune -o \
                 -name 'lost+found' -a -prune -o \                  -name 'lost+found' -a -prune -o \
Line 91  if [ "$find_core" != NO ] ; then
Line 99  if [ "$find_core" != NO ] ; then
         rm -f $TMP $TMP2          rm -f $TMP $TMP2
 fi  fi
   
 if [ "$run_msgs" != NO ]; then  if checkyesno run_msgs; then
         msgs -c          msgs -c
 fi  fi
   
 if [ "$expire_news" != NO -a -f /etc/news.expire ]; then  if checkyesno expire_news && [ -f /etc/news.expire ]; then
         /etc/news.expire          /etc/news.expire
 fi  fi
   
 if [ "$purge_accounting" != NO -a -f /var/account/acct ]; then  if checkyesno purge_accounting && [ -f /var/account/acct ]; then
         echo ""          echo ""
         echo "Purging accounting records:"          echo "Purging accounting records:"
         mv /var/account/acct.2 /var/account/acct.3          mv /var/account/acct.2 /var/account/acct.3
Line 109  if [ "$purge_accounting" != NO -a -f /va
Line 117  if [ "$purge_accounting" != NO -a -f /va
         sa -sq          sa -sq
 fi  fi
   
 if [ "$run_calendar" != NO ]; then  if checkyesno run_calendar; then
         calendar -a > $TMP          calendar -a > $TMP
         if [ -s $TMP ]; then          if [ -s $TMP ]; then
                 echo ""                  echo ""
Line 119  if [ "$run_calendar" != NO ]; then
Line 127  if [ "$run_calendar" != NO ]; then
         rm -f $TMP          rm -f $TMP
 fi  fi
   
 if [ "$check_uucp" != NO -a -d /var/spool/uucp -a \  if checkyesno check_uucp && \
     -f /usr/libexec/uucp/clean.daily ]; then      [ -d /var/spool/uucp -a -f /usr/libexec/uucp/clean.daily ]; then
         echo ""          echo ""
         echo "Cleaning up UUCP:"          echo "Cleaning up UUCP:"
         su daemon -c /usr/libexec/uucp/clean.daily          su daemon -c /usr/libexec/uucp/clean.daily
 fi  fi
   
 if [ "$check_disks" != NO ]; then  if checkyesno check_disks; then
         df -k > $TMP          df -k > $TMP
         dump W > $TMP2          dump W > $TMP2
         if [ -s $TMP -o -s $TMP2 ]; then          if [ -s $TMP -o -s $TMP2 ]; then
Line 148  fi
Line 156  fi
   
 rm -f $TMP $TMP2  rm -f $TMP $TMP2
   
 if [ "$check_mailq" != NO ]; then  if checkyesno check_mailq; then
         mailq > $TMP          mailq > $TMP
         if ! grep -q "^Mail queue is empty$" $TMP; then          if ! grep -q "^Mail queue is empty$" $TMP; then
                 echo ""                  echo ""
Line 159  fi
Line 167  fi
   
 rm -f $TMP  rm -f $TMP
   
 if [ "$check_uucp" != NO -a -d /var/spool/uucp ]; then  if checkyesno check_uucp && [ -d /var/spool/uucp ]; then
         uustat -a > $TMP          uustat -a > $TMP
         if [ -s $TMP ]; then          if [ -s $TMP ]; then
                 echo ""                  echo ""
Line 170  fi
Line 178  fi
   
 rm -f $TMP  rm -f $TMP
   
 if [ "$check_network" != NO ]; then  if checkyesno check_network; then
         echo ""          echo ""
         echo "network:"          echo "network:"
         netstat -i          netstat -i
Line 181  if [ "$check_network" != NO ]; then
Line 189  if [ "$check_network" != NO ]; then
         fi          fi
 fi  fi
   
 if [ "$run_fsck" != NO ]; then  if checkyesno run_fsck; then
         echo ""          echo ""
         echo "Checking filesystems:"          echo "Checking filesystems:"
         fsck -n | grep -v '^\*\* Phase'          fsck -n | grep -v '^\*\* Phase'
 fi  fi
   
 echo ""  echo ""
 if [ "$run_rdist" != NO -a -f /etc/Distfile ]; then  if checkyesno run_rdist && [ -f /etc/Distfile ]; then
         echo "Running rdist:"          echo "Running rdist:"
         if [ -d /var/log/rdist ]; then          if [ -d /var/log/rdist ]; then
                 logf=`date +%Y.%b.%e`                  logf=`date +%Y.%b.%e`
Line 198  if [ "$run_rdist" != NO -a -f /etc/Distf
Line 206  if [ "$run_rdist" != NO -a -f /etc/Distf
         fi          fi
 fi  fi
   
 if [ "$run_security" != NO ]; then  if checkyesno run_security; then
         sh /etc/security 2>&1 | mail -s "$host daily insecurity output" $MAILTO          sh /etc/security 2>&1 | mail -s "$host daily insecurity output" $MAILTO
 fi  fi
   

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

CVSweb <webmaster@jp.NetBSD.org>