init scripts no longer use bash.
authorRoy Marples <uberlord@gentoo.org>
Fri, 23 Feb 2007 13:56:05 +0000 (13:56 +0000)
committerRoy Marples <uberlord@gentoo.org>
Fri, 23 Feb 2007 13:56:05 +0000 (13:56 +0000)
Package-Manager: portage-2.1.2-r10

sys-freebsd/freebsd-sbin/ChangeLog
sys-freebsd/freebsd-sbin/files/devd.initd
sys-freebsd/freebsd-sbin/files/ipfw.initd
sys-freebsd/freebsd-sbin/files/sysctl.initd

index d1a3e61c052a3f08dc82c7c635fe0b2e356bc09f..7194765730b12888ed87d98836c1330bcfc962cf 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for sys-freebsd/freebsd-sbin
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.32 2007/01/15 21:38:54 drizzt Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.33 2007/02/23 13:56:05 uberlord Exp $
+
+  23 Feb 2007; Roy Marples <uberlord@gentoo.org> files/devd.initd,
+  files/ipfw.initd, files/sysctl.initd:
+  init scripts no longer use bash.
 
 *freebsd-sbin-6.2 (15 Jan 2007)
 
index b8414abb56b76a34166dfc23ad7b44ab0d672ca0..c2017f0d589f3f36a7f6186778ed95a645fd6c96 100644 (file)
@@ -16,31 +16,31 @@ start() {
        # This is used by /etc/devd_queue
        mkdir -p /var/run/devd
 
-       ebegin $"Starting the Device State Change Daemon"
+       ebegin "Starting the Device State Change Daemon"
        sysctl hw.bus.devctl_disable=0 >/dev/null
        start-stop-daemon --start --exec /sbin/devd \
                --pidfile /var/run/devd.pid
-       eend $? $"Failed to start devd" \
+       eend $? "Failed to start devd" \
        || return $?
 
-       ebegin $"Waiting for Device State Change Daemon to settle"
-       LC_ALL=C sleep ${DEVD_WAIT:-2}
+       ebegin "Waiting for Device State Change Daemon to settle"
+       LC_ALL=C sleep "${DEVD_WAIT:-2}"
        eend $?
 
        # Now flush the queue
-       einfo $"Flushing Device State Change Daemon queue"
+       einfo "Flushing Device State Change Daemon queue"
 
        # Flush the output buffer
        eflush
 
        /etc/devd_queue flush
 
-       mark_service_starting "${SVCNAME}"
+       mark_service_started "${SVCNAME}"
        return 0
 }
 
 stop() {
-       ebegin $"Stopping the Device State Change Daemon"
+       ebegin "Stopping the Device State Change Daemon"
        sysctl hw.bus.devctl_disable=1 >/dev/null
        start-stop-daemon --stop --exec /sbin/devd \
                --pidfile /var/run/devd.pid
index 27242befaa331c969f3555ac6a0d1511a054031b..71118e7bea22c97d68daf51a8bb01ddda318928c 100644 (file)
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/files/ipfw.initd,v 1.1 2006/04/01 16:43:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/files/ipfw.initd,v 1.2 2007/02/23 13:56:05 uberlord Exp $
 
 depend() {
         before net
@@ -19,7 +19,7 @@ start() {
                fi
        fi
 
-       if [ -z "${firewall_script}" -o ! -f "${firewall_script}" ]; then
+       if [ -z "${firewall_script}" ] || [ ! -f "${firewall_script}" ]; then
                firewall_script=/etc/rc.firewall
        fi
 
@@ -27,12 +27,12 @@ start() {
                source "${firewall_script}"
                einfo "Loaded firewall rules; starting daemons"
 
-               if [ "${natd_enable}" == "yes" ]; then
+               if [ "${natd_enable}" = "yes" ]; then
                        # Find out whether $natd_interface is using dhcp
                        ifconfig_natd_iface=$(
                                eval source /etc/conf.d/net\;
                                echo \$\{ifconfig_${natd_interface}\})
-                       if [ "${ifconfig_natd_iface}" == "dhcp" ]; then
+                       if [ "${ifconfig_natd_iface}" = "dhcp" ]; then
                                natd_flags="${natd_flags} -dynamic"
                        fi
 
@@ -54,7 +54,7 @@ start() {
        fi
 
        # Logging
-       if [ "${firewall_logging}" == "yes" ]; then
+       if [ "${firewall_logging}" = "yes" ]; then
                einfo "Enabling firewall logging"
                sysctl net.inet.ip.fw.verbose=1 >/dev/null
        fi
index e719061a2978a212efcd298d553bc7302375476b..12974a00aac7b76babef682a3a33687173172e64 100644 (file)
@@ -1,26 +1,28 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/files/sysctl.initd,v 1.3 2006/10/03 13:38:06 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/files/sysctl.initd,v 1.4 2007/02/23 13:56:05 uberlord Exp $
 
 depend() {
        need checkroot
 }
 
 start() {
-       ebegin $"Configuring kernel parameters"
+       ebegin "Configuring kernel parameters"
 
-       if [[ ! -f /etc/sysctl.conf ]]; then
-               eend 1 "/etc/sysctl.conf" $"not found"
+       if [ ! -f /etc/sysctl.conf ]; then
+               eend 1 "/etc/sysctl.conf" "not found"
                return 1
        fi
        
        local retval=0 var= comments=
        while read var comments ; do
-               [[ -z ${var} || ${var} == "#"* ]] && continue
+               case "${var}" in
+                       ""|"#"*) continue;;
+               esac
                sysctl "${var}" >/dev/null || retval=1
        done < /etc/sysctl.conf
-       eend ${retval} $"Some errors were encountered"
+       eend ${retval} "Some errors were encountered"
 }
 
 # vim: set ts=4 :