[BACK]Return to rc CVS log [TXT][DIR] Up to [local] / src / etc

Diff for /src/etc/rc between version 1.352 and 1.353

version 1.352, 2011/04/22 06:08:14 version 1.353, 2011/07/06 18:55:36
Line 142 
Line 142 
         }          }
 }  }
   
   start_daemon()
   {
           local _n;
           for _n; do
                   eval _do=\${${_n}_flags}
                   if [ X"${_do}" != X"NO" ]; then
                           /etc/rc.d/${_n} start
                   fi
           done
   }
   
 # End subroutines  # End subroutines
   
 stty status '^T'  stty status '^T'
Line 340 
Line 351 
 # save a copy of the boot messages  # save a copy of the boot messages
 dmesg >/var/run/dmesg.boot  dmesg >/var/run/dmesg.boot
   
 echo 'starting system logger'  echo -n 'starting system logger: '
 rm -f /dev/log  start_daemon syslogd
 if [ X"${httpd_flags}" != X"-u" ]; then  echo '.'
         rm -f /var/www/dev/log  
         syslogd_flags="${syslogd_flags} -a /var/www/dev/log"  
 fi  
 if [ X"${named_flags}" != X"NO" ]; then  
         rm -f /var/named/dev/log  
         syslogd_flags="${syslogd_flags} -a /var/named/dev/log"  
 fi  
 if [ X"${nsd_flags}" != X"NO" ]; then  
         rm -f /var/nsd/dev/log  
         syslogd_flags="${syslogd_flags} -a /var/nsd/dev/log"  
 fi  
 if [ -d /var/empty ]; then  
         rm -f /var/empty/dev/log  
         mkdir -p -m 0555 /var/empty/dev  
         syslogd_flags="${syslogd_flags} -a /var/empty/dev/log"  
 fi  
 syslogd ${syslogd_flags}  
   
 if [ X"${pf}" != X"NO" ]; then  if [ X"${pf}" != X"NO" ]; then
         ifconfig pflog0 create >/dev/null 2>&1          ifconfig pflog0 create >/dev/null 2>&1
Line 381 
Line 375 
                         echo failed.                          echo failed.
                 fi                  fi
         fi          fi
   
         echo 'starting named';          named $named_flags  
 fi  fi
   
 if [ X"${nsd_flags}" != X"NO" ]; then  echo -n 'starting name service daemons:'
         echo 'starting nsd';            nsd $nsd_flags  start_daemon named nsd
 fi  echo '.'
   
 if [ ! -f /etc/isakmpd/private/local.key ]; then  if [ ! -f /etc/isakmpd/private/local.key ]; then
         echo -n "openssl: generating new isakmpd/iked RSA key... "          echo -n "openssl: generating new isakmpd/iked RSA key... "
Line 409 
Line 401 
         cp /etc/isakmpd/local.pub /etc/iked/local.pub          cp /etc/isakmpd/local.pub /etc/iked/local.pub
 fi  fi
   
 if [ X"${isakmpd_flags}" != X"NO" ]; then  echo -n 'starting IPsec daemons:'
         if [ X"${sasyncd_flags}" != X"NO" ]; then  start_daemon isakmpd iked sasyncd
                 isakmpd_flags="-S ${isakmpd_flags}"  echo '.'
         fi  
         echo 'starting isakmpd';        isakmpd ${isakmpd_flags}  
 fi  
   
 if [ X"${iked_flags}" != X"NO" ]; then  
         if [ X"${sasyncd_flags}" != X"NO" ]; then  
                 iked_flags="-S ${iked_flags}"  
         fi  
         echo 'starting iked';           iked ${iked_flags}  
 fi  
   
 if [ X"${sasyncd_flags}" != X"NO" ]; then  
         echo 'starting sasyncd';        sasyncd ${sasyncd_flags}  
 fi  
   
 if [ X"${ipsec}" != X"NO" ]; then  if [ X"${ipsec}" != X"NO" ]; then
         if [ -f ${ipsec_rules} ]; then          if [ -f ${ipsec_rules} ]; then
                 ipsecctl -f ${ipsec_rules}                  ipsecctl -f ${ipsec_rules}
Line 493 
Line 471 
         echo -n ' rdate';       rdate -s ${rdate_flags}          echo -n ' rdate';       rdate -s ${rdate_flags}
 fi  fi
   
 if [ X"${timed_flags}" != X"NO" ]; then  start_daemon timed ldattach ntpd
         echo -n ' timed'; timed $timed_flags  
 fi  
   
 if [ X"${ldattach_flags}" != X"NO" -a -n "${ldattach_flags}" ]; then  
         echo -n ' ldattach'; ldattach ${ldattach_flags}  
 fi  
   
 if [ X"${ntpd_flags}" != X"NO" ]; then  
         echo -n ' ntpd'; ntpd $ntpd_flags  
 fi  
 echo '.'  echo '.'
   
 mount -a  mount -a
Line 619 
Line 588 
   
 /usr/bin/ssh-keygen -A  /usr/bin/ssh-keygen -A
   
 echo -n starting network daemons:  echo -n 'starting network daemons:'
   
 if [ X"${sshd_flags}" != X"NO" ]; then  start_daemon sshd snmpd ldpd ripd bgpd ifstated relayd dhcpd \
         echo -n ' sshd';                /usr/sbin/sshd ${sshd_flags}          dhcrelay mrouted dvmrpd
 fi  
   
 if [ X"${snmpd_flags}" != X"NO" ]; then  
         echo -n ' snmpd';               /usr/sbin/snmpd $snmpd_flags  
 fi  
   
 if [ X"${ldpd_flags}" != X"NO" ]; then  
         echo -n ' ldpd';                /usr/sbin/ldpd $ldpd_flags  
 fi  
   
 if [ X"${ripd_flags}" != X"NO" ]; then  
         echo -n ' ripd';                /usr/sbin/ripd $ripd_flags  
 fi  
   
 if [ X"${mrouted_flags}" != X"NO" ]; then  
         echo -n ' mrouted';             mrouted $mrouted_flags  
 fi  
   
 if [ X"${dvmrpd_flags}" != X"NO" ]; then  
         echo -n ' dvmrpd';              /usr/sbin/dvmrpd $dvmrpd_flags  
 fi  
   
 if [ X"${ospfd_flags}" != X"NO" ]; then  
         echo -n ' ospfd';               /usr/sbin/ospfd $ospfd_flags  
 fi  
   
 if [ X"${ospf6d_flags}" != X"NO" ]; then  
         echo -n ' ospf6d';              /usr/sbin/ospf6d $ospf6d_flags  
 fi  
   
 if [ X"${bgpd_flags}" != X"NO" ]; then  
         echo -n ' bgpd';                /usr/sbin/bgpd $bgpd_flags  
 fi  
   
 if [ X"${ifstated_flags}" != X"NO" ]; then  
         echo -n ' ifstated';            ifstated $ifstated_flags  
 fi  
   
 if [ X"${relayd_flags}" != X"NO" ]; then  
         echo -n ' relayd';              /usr/sbin/relayd $relayd_flags  
 fi  
   
 if [ X"${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then  
         touch /var/db/dhcpd.leases  
         echo -n ' dhcpd';       /usr/sbin/dhcpd ${dhcpd_flags}  
 fi  
   
 if [ X"${dhcrelay_flags}" != X"NO" ]; then  
         echo -n ' dhcrelay';            /usr/sbin/dhcrelay $dhcrelay_flags  
 fi  
   
 if ifconfig lo0 inet6 >/dev/null 2>&1; then  if ifconfig lo0 inet6 >/dev/null 2>&1; then
         fw=`sysctl -n net.inet6.ip6.forwarding`          fw=`sysctl -n net.inet6.ip6.forwarding`
         if [ X"${fw}" = X"0" ]; then          if [ X"${fw}" = X"0" ]; then
                 if [ X"${rtsold_flags}" != X"NO" ]; then                  start_daemon rtsold
                         echo -n ' rtsold'  
                         /usr/sbin/rtsold ${rtsold_flags}  
                 fi  
         else          else
                 if [ X"${route6d_flags}" != X"NO" ]; then                  start_daemon route6d
                         echo -n ' route6d'                  start_daemon rtadvd
                         /usr/sbin/route6d ${route6d_flags}  
                 fi  
                 if [ X"${rtadvd_flags}" != X"NO" ]; then  
                         echo -n ' rtadvd'  
                         /usr/sbin/rtadvd ${rtadvd_flags}  
                 fi  
         fi          fi
 fi  fi
   
 if [ X"${hostapd_flags}" != X"NO" ]; then  start_daemon hostapd rwhod lpd ldapd sendmail smtpd httpd ftpd \
         echo -n ' hostapd';             /usr/sbin/hostapd ${hostapd_flags}          ftpproxy identd inetd rarpd bootparamd rbootd mopd
 fi  
   
 if [ X"${bt}" != X"NO" ]; then  if [ X"${bt}" != X"NO" ]; then
         echo -n ' btd';                 /usr/sbin/btd          echo -n ' btd';                 /usr/sbin/btd
Line 704 
Line 613 
         fi          fi
 fi  fi
   
 if [ X"${rwhod}" = X"YES" ]; then  
         echo -n ' rwhod';               rwhod  
 fi  
   
   
 if [ X"${lpd_flags}" != X"NO" ]; then  
         echo -n ' lpd';                 lpd ${lpd_flags}  
 fi  
   
 if [ X"${ldapd_flags}" != X"NO" ]; then  
         echo -n ' ldapd';               /usr/sbin/ldapd ${ldapd_flags}  
 fi  
   
 # We call sendmail with a full path so that SIGHUP works.  
 # Note that /usr/sbin/sendmail may actually call a  
 # mailer other than sendmail, depending on /etc/mailer.conf.  
 if [ X"${sendmail_flags}" != X"NO" -a -s /etc/mailer.conf ]; then  
         echo -n ' sendmail';            ( /usr/sbin/sendmail ${sendmail_flags} >/dev/null 2>&1 & )  
 fi  
   
 if [ X"${smtpd_flags}" != X"NO" ]; then  
         echo -n ' smtpd'; smtpd $smtpd_flags  
 fi  
   
 if [ X"${httpd_flags}" != X"NO" ]; then  
         # Clean up left-over httpd locks  
         rm -f /var/www/logs/{ssl_mutex,httpd.lock,accept.lock}.*  
         echo -n ' httpd';               /usr/sbin/httpd ${httpd_flags}  
 fi  
   
 if [ X"${ftpd_flags}" != X"NO" ]; then  
         echo -n ' ftpd';                /usr/libexec/ftpd ${ftpd_flags}  
 fi  
   
 if [ X"${ftpproxy_flags}" != X"NO" ]; then  
         echo -n ' ftp-proxy';           /usr/sbin/ftp-proxy ${ftpproxy_flags}  
 fi  
   
 if [ X"${identd_flags}" != X"NO" ]; then  
         echo -n ' identd';              /usr/libexec/identd ${identd_flags}  
 fi  
   
 if [ X"${inetd}" = X"YES" -a -e /etc/inetd.conf ]; then  
         echo -n ' inetd';               inetd  
 fi  
   
 if [ X"${spamd_flags}" != X"NO" ]; then  if [ X"${spamd_flags}" != X"NO" ]; then
         if [ X"${spamd_black}" != X"NO" ]; then          if [ X"${spamd_black}" != X"NO" ]; then
                 spamd_flags="${spamd_flags} -b"                  spamd_flags="${spamd_flags} -b"
Line 762 
Line 625 
         fi          fi
 fi  fi
   
 if [ X"${rarpd_flags}" != X"NO" -a -s /etc/ethers ]; then  
         echo -n ' rarpd';               rarpd ${rarpd_flags}  
 fi  
   
 if [ X"${bootparamd_flags}" != X"NO" -a -s /etc/bootparams ]; then  
         echo -n ' rpc.bootparamd';      rpc.bootparamd ${bootparamd_flags}  
 fi  
   
 if [ X"${rbootd_flags}" != X"NO" -a -s /etc/rbootd.conf ]; then  
         echo -n ' rbootd';              rbootd ${rbootd_flags}  
 fi  
   
 if [ X"${mopd_flags}" != X"NO" -a -d /tftpboot/mop ]; then  
         echo -n ' mopd';                mopd ${mopd_flags}  
 fi  
   
 echo '.'  echo '.'
   
 mixerctl_conf  mixerctl_conf
Line 819 
Line 666 
   
 [ -f /etc/rc.local ] && . /etc/rc.local  [ -f /etc/rc.local ] && . /etc/rc.local
   
 echo -n starting standard daemons:  echo -n 'starting standard daemons:'
   
 if [ X"${apmd_flags}" != X"NO" -a -x /usr/sbin/apmd ]; then  start_daemon apmd sensorsd hotplugd watchdogd cron
         echo -n ' apmd';        /usr/sbin/apmd ${apmd_flags}  
 fi  
   
 if [ X"${sensorsd_flags}" != X"NO" ]; then  
         echo -n ' sensorsd';    /usr/sbin/sensorsd ${sensorsd_flags}  
 fi  
   
 if [ X"${hotplugd_flags}" != X"NO" -a -x /usr/sbin/hotplugd ]; then  
         echo -n ' hotplugd';    /usr/sbin/hotplugd ${hotplugd_flags}  
 fi  
   
 if [ X"${watchdogd_flags}" != X"NO" -a -x /usr/sbin/watchdogd ]; then  
         echo -n ' watchdogd';   /usr/sbin/watchdogd ${watchdogd_flags}  
 fi  
   
 echo -n ' cron';                cron  
   
 # disable carp interlock  # disable carp interlock
 ifconfig -g carp -carpdemote 128  ifconfig -g carp -carpdemote 128

Legend:
Removed from v.1.352  
changed lines
  Added in v.1.353