From: Roy Marples Date: Fri, 23 Feb 2007 13:56:05 +0000 (+0000) Subject: init scripts no longer use bash. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=75c6e80c2cc2dcf3dc0b8e4bc88cc5009e8c47ce;p=gentoo.git init scripts no longer use bash. Package-Manager: portage-2.1.2-r10 --- diff --git a/sys-freebsd/freebsd-sbin/ChangeLog b/sys-freebsd/freebsd-sbin/ChangeLog index d1a3e61c052a..7194765730b1 100644 --- a/sys-freebsd/freebsd-sbin/ChangeLog +++ b/sys-freebsd/freebsd-sbin/ChangeLog @@ -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 files/devd.initd, + files/ipfw.initd, files/sysctl.initd: + init scripts no longer use bash. *freebsd-sbin-6.2 (15 Jan 2007) diff --git a/sys-freebsd/freebsd-sbin/files/devd.initd b/sys-freebsd/freebsd-sbin/files/devd.initd index b8414abb56b7..c2017f0d589f 100644 --- a/sys-freebsd/freebsd-sbin/files/devd.initd +++ b/sys-freebsd/freebsd-sbin/files/devd.initd @@ -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 diff --git a/sys-freebsd/freebsd-sbin/files/ipfw.initd b/sys-freebsd/freebsd-sbin/files/ipfw.initd index 27242befaa33..71118e7bea22 100644 --- a/sys-freebsd/freebsd-sbin/files/ipfw.initd +++ b/sys-freebsd/freebsd-sbin/files/ipfw.initd @@ -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 diff --git a/sys-freebsd/freebsd-sbin/files/sysctl.initd b/sys-freebsd/freebsd-sbin/files/sysctl.initd index e719061a2978..12974a00aac7 100644 --- a/sys-freebsd/freebsd-sbin/files/sysctl.initd +++ b/sys-freebsd/freebsd-sbin/files/sysctl.initd @@ -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 :