diff options
Diffstat (limited to 'net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d')
-rw-r--r-- | net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d b/net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d new file mode 100644 index 000000000000..873e65dbb4cf --- /dev/null +++ b/net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/xsupplicant/files/xsupplicant-1.2.2-init.d,v 1.1 2006/01/13 14:47:59 brix Exp $ + +depend() { + before net +} + +checkconfig() { + if [ ! -f /etc/xsupplicant.conf ]; then + eerror "Configuration file /etc/xsupplicant.conf not found" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting xsupplicant" + + for IFACE in $INTERFACES; do + ebegin " ${IFACE}" + + eval ARGS_IFACE=\"\$\{ARGS_$IFACE\}\" + + start-stop-daemon --start --quiet --background --exec /usr/sbin/xsupplicant \ + -- -i${IFACE} -c/etc/xsupplicant.conf ${ARGS} ${ARGS_IFACE} + eend ${?} + done +} + +stop() { + ebegin "Stopping xsupplicant" + + start-stop-daemon --stop --quiet --exec /usr/sbin/xsupplicant + eend ${?} +} + |