summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/freebsd-usbin/ChangeLog7
-rw-r--r--sys-freebsd/freebsd-usbin/files/moused.initd41
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/nfsmount.initd7
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/powerd.initd14
-rw-r--r--sys-freebsd/freebsd-usbin/files/rarpd.initd6
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/syscons.initd38
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/syslogd.initd6
7 files changed, 63 insertions, 56 deletions
diff --git a/sys-freebsd/freebsd-usbin/ChangeLog b/sys-freebsd/freebsd-usbin/ChangeLog
index 436811e24d56..115cdee4f6ae 100644
--- a/sys-freebsd/freebsd-usbin/ChangeLog
+++ b/sys-freebsd/freebsd-usbin/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-freebsd/freebsd-usbin
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.40 2007/01/16 23:15:08 drizzt Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.41 2007/02/23 14:03:08 uberlord Exp $
+
+ 23 Feb 2007; Roy Marples <uberlord@gentoo.org> files/moused.initd,
+ files/nfsmount.initd, files/powerd.initd, files/rarpd.initd,
+ files/syscons.initd, files/syslogd.initd:
+ Don't use bashisms in init scripts.
16 Jan 2007; Timothy Redaelli <drizzt@gentoo.org>
+files/freebsd-usbin-6.2_rc2-libedit-netbsd.patch:
diff --git a/sys-freebsd/freebsd-usbin/files/moused.initd b/sys-freebsd/freebsd-usbin/files/moused.initd
index 19db707f1476..3ac9a34c9d30 100644
--- a/sys-freebsd/freebsd-usbin/files/moused.initd
+++ b/sys-freebsd/freebsd-usbin/files/moused.initd
@@ -1,15 +1,15 @@
#!/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-usbin/files/moused.initd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/moused.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
-MOUSED_NAME="${SVCNAME##*.}"
-if [[ -n ${MOUSED_NAME} && ${MOUSED_NAME} != "moused" ]] ; then
- MOUSED_DEVICE="/dev/${MOUSED_NAME}"
- MOUSED_PIDFILE="/var/run/moused-${MOUSED_NAME}.pid"
+MOUSED_NAME=${SVCNAME##*.}
+if [ -n "${MOUSED_NAME}" ] && [ ${MOUSED_NAME} != "moused" ] ; then
+ MOUSED_DEVICE=/dev/"${MOUSED_NAME}"
+ MOUSED_PIDFILE=/var/run/moused-"${MOUSED_NAME}".pid
else
MOUSED_NAME=
- MOUSED_PIDFILE="/var/run/moused.pid"
+ MOUSED_PIDFILE=/var/run/moused.pid
fi
depend() {
@@ -17,13 +17,13 @@ depend() {
}
start() {
- ebegin $"Starting the Console Mouse Daemon" "${MOUSED_NAME}"
+ ebegin "Starting the Console Mouse Daemon" "${MOUSED_NAME}"
- if [[ -z ${MOUSED_DEVICE} ]] ; then
+ if [ -z ${MOUSED_DEVICE} ] ; then
for x in /dev/psm[0-9]* /dev/ums[0-9]* ; do
- if [[ -e ${x} && \
- ! -e /var/run/moused-$(basename "${x}").pid ]] ; then
- MOUSED_DEVICE="${x}"
+ if [ -e "${x}" ] && \
+ [ ! -e /var/run/moused-$(basename "${x}").pid ] ; then
+ MOUSED_DEVICE=${x}
eindent
einfo "Using mouse on ${MOUSED_DEVICE}"
eoutdent
@@ -32,9 +32,9 @@ start() {
done
fi
- if [[ -z ${MOUSED_DEVICE} ]] ; then
- eend 1 $"No device specified in" "/etc/conf.d/${SVCNAME}" \
- $"and no mouse detected"
+ if [ -z "${MOUSED_DEVICE}" ] ; then
+ eend 1 "No device specified in" "/etc/conf.d/${SVCNAME}" \
+ "and no mouse detected"
return 1
fi
@@ -44,21 +44,22 @@ start() {
-- ${opts} -I "${MOUSED_PIDFILE}"
local retval=$?
- [[ -n ${MOUSE_CHAR_START} ]] && MOUSE_CHAR_START="-M ${MOUSE_CHAR_START}"
+ [ -n "${MOUSE_CHAR_START}" ] && MOUSE_CHAR_START="-M ${MOUSE_CHAR_START}"
local ttyv=
for ttyv in /dev/ttyv* ; do
- vidcontrol < ${ttyv} ${MOUSE_CHAR_START} -m on || retval=1
+ vidcontrol < "${ttyv}" ${MOUSE_CHAR_START} -m on || retval=1
done
- eend ${retval} $"Failed to start moused"
+ eend ${retval} "Failed to start moused"
}
stop() {
- ebegin $"Stopping the Console Mouse Daemon" "${MOUSED_NAME}"
+ ebegin "Stopping the Console Mouse Daemon" "${MOUSED_NAME}"
# Don't specify the binary as >1 instance of moused may be running
# which is perfectly valid as we can be multiplexed.
- start-stop-daemon --stop --quiet --pidfile "${MOUSED_PIDFILE}"
- eend $? $"Failed to stop moused"
+ start-stop-daemon --stop --exec /usr/sbin/moused \
+ --pidfile "${MOUSED_PIDFILE}"
+ eend $? "Failed to stop moused"
}
# vim: set ts=4 :
diff --git a/sys-freebsd/freebsd-usbin/files/nfsmount.initd b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
index bf30eeb92870..a17dff3957a4 100755
--- a/sys-freebsd/freebsd-usbin/files/nfsmount.initd
+++ b/sys-freebsd/freebsd-usbin/files/nfsmount.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfsmount.initd,v 1.1 2006/04/01 16:43:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfsmount.initd,v 1.2 2007/02/23 14:03:08 uberlord Exp $
depend() {
need net rpcbind
@@ -61,8 +61,3 @@ stop() {
stop_statd
stop_lockd
}
-
-restart() {
- svc_stop
- svc_start
-}
diff --git a/sys-freebsd/freebsd-usbin/files/powerd.initd b/sys-freebsd/freebsd-usbin/files/powerd.initd
index 03112d3535c1..c99adf846448 100755
--- a/sys-freebsd/freebsd-usbin/files/powerd.initd
+++ b/sys-freebsd/freebsd-usbin/files/powerd.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/powerd.initd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/powerd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
depend() {
need localmount
@@ -9,19 +9,19 @@ depend() {
start() {
local args=
- [[ -n ${BATTERY_MODE} ]] && args="${args} -b ${BATTERY_MODE}"
- [[ -n ${AC_MODE} ]] && args="${args} -a ${AC_MODE}"
+ [ -n "${BATTERY_MODE}" ] && args="${args} -b ${BATTERY_MODE}"
+ [ -n "${AC_MODE}" ] && args="${args} -a ${AC_MODE}"
- ebegin $"Starting Power Control Daemon"
+ ebegin "Starting Power Control Daemon"
start-stop-daemon --start --exec /usr/sbin/powerd \
--pidfile /var/run/powerd.pid \
-- ${args} ${POWERD_OPTS}
- eend $? $"Failed to start powerd"
+ eend $? "Failed to start powerd"
}
stop() {
- ebegin $"Stopping Power Control Daemon"
+ ebegin "Stopping Power Control Daemon"
start-stop-daemon --stop --exec /usr/sbin/powerd \
--pidfile /var/run/powerd.pid
- eend $? $"Failed to stop powerd"
+ eend $? "Failed to stop powerd"
}
diff --git a/sys-freebsd/freebsd-usbin/files/rarpd.initd b/sys-freebsd/freebsd-usbin/files/rarpd.initd
index ab4ad4f59c91..f5b21c8218ee 100644
--- a/sys-freebsd/freebsd-usbin/files/rarpd.initd
+++ b/sys-freebsd/freebsd-usbin/files/rarpd.initd
@@ -1,10 +1,10 @@
#!/sbin/runscript
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.initd,v 1.2 2006/11/20 12:37:43 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
depend() {
- if [[ -z ${RARPD_ONLY_INTERFACE} ]]; then
+ if [ -z "${RARPD_ONLY_INTERFACE}" ]; then
need net
else
need net."${RARPD_ONLY_INTERFACE}"
@@ -14,7 +14,7 @@ depend() {
start() {
local rarpd_opts
- if [[ -z ${RARPD_ONLY_INTERFACE} ]]; then
+ if [ -z "${RARPD_ONLY_INTERFACE}" ]; then
rarpd_opts="${rarpd_opts} -a"
else
rarpd_opts="${rarpd_opts} ${RARPD_ONLY_INTERFACE}"
diff --git a/sys-freebsd/freebsd-usbin/files/syscons.initd b/sys-freebsd/freebsd-usbin/files/syscons.initd
index 0bc9cda88512..320b870d2ece 100755
--- a/sys-freebsd/freebsd-usbin/files/syscons.initd
+++ b/sys-freebsd/freebsd-usbin/files/syscons.initd
@@ -1,16 +1,16 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syscons.initd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syscons.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
depend() {
need localmount
}
start() {
- ebegin $"Configuring system console"
+ ebegin "Configuring system console"
- if [[ -n ${MODE} ]] ; then
+ if [ -n "${MODE}" ] ; then
einfo "Setting mode to ${MODE}"
vidcontrol "${MODE}"
eend $?
@@ -20,37 +20,43 @@ start() {
# Set the keymap.
if [ -n "${KEYMAP}" ]; then
- einfo $"Setting keymap to" "${KEYMAP}"
+ einfo "Setting keymap to" "${KEYMAP}"
kbdcontrol -l ${KEYMAP} < /dev/console
fi
if [ -n "${KEYRATE}" ]; then
- einfo $"Setting keyrate to" "${KEYRATE}"
+ einfo "Setting keyrate to" "${KEYRATE}"
kbdcontrol -r ${KEYRATE} < /dev/console
fi
if [ -n "${KEYCHANGE}" ]; then
- einfo $"Changing function keys..."
- while read $a $b; do
- kbdcontrol -f "$a" "$b" < /dev/console
- done <<< ${KEYCHANGE}
+ einfo "Changing function keys..."
+ eval set -- "${KEYCHANGE}"
+ eindent
+ while [ $# -gt 0 ] ; do
+ veinfo "F$1 -> \`$2'"
+ kbdcontrol -f "$1" "$2" < /dev/console
+ shift ; shift
+ done
+ eoutdent
fi
if [ -n "${CURSOR}" ]; then
- einfo $"Setting cursor"
+ einfo "Setting cursor"
vidcontrol -c ${CURSOR}
fi
- einfo $"Setting custom fonts..."
+ einfo "Setting custom fonts..."
# Nothing to see here, move along...
- for v in FONT8x{16,14,8}; do
- if [ -n "${!v}" ]; then
- vidcontrol -f ${v##FONT} ${!v}
+ for v in FONT8x16 FONT8x14 FONT8x8; do
+ f=$(eval \$"${v}")
+ if [ -n "${f}" ]; then
+ vidcontrol -f ${v##FONT} ${f}
fi
done
if [ -n "${BLANKTIME}" ]; then
- einfo $"Setting blanktime"
+ einfo "Setting blanktime"
vidcontrol -t ${BLANKTIME}
fi
@@ -62,7 +68,7 @@ start() {
fi
if [ -n "${KBDFLAGS}" ]; then
- einfo $"Setting keyboard flags for all screens"
+ einfo "Setting keyboard flags for all screens"
for ttyv in /dev/ttyv*; do
kbdcontrol ${KBDFLAGS} <${ttyv} &>${ttyv}
done
diff --git a/sys-freebsd/freebsd-usbin/files/syslogd.initd b/sys-freebsd/freebsd-usbin/files/syslogd.initd
index b0eb291e40b3..0cb314e50791 100755
--- a/sys-freebsd/freebsd-usbin/files/syslogd.initd
+++ b/sys-freebsd/freebsd-usbin/files/syslogd.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-usbin/files/syslogd.initd,v 1.2 2006/10/03 14:43:39 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/syslogd.initd,v 1.3 2007/02/23 14:03:08 uberlord Exp $
depend() {
provide logger
@@ -9,14 +9,14 @@ depend() {
}
start() {
- ebegin $"Starting System Logger"
+ ebegin "Starting System Logger"
start-stop-daemon --start --quiet --exec /usr/sbin/syslogd \
-- ${SYSLOGD_OPTS}
eend $?
}
stop() {
- ebegin $"Stopping System Logger"
+ ebegin "Stopping System Logger"
start-stop-daemon --stop --quiet --pidfile /var/run/syslog.pid
eend $?
}