diff options
Diffstat (limited to 'net-wireless/kismet/files/kismet-2005.04.1-init.d')
-rw-r--r-- | net-wireless/kismet/files/kismet-2005.04.1-init.d | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/net-wireless/kismet/files/kismet-2005.04.1-init.d b/net-wireless/kismet/files/kismet-2005.04.1-init.d index 0d2b7152f1e4..3f3d34b9e016 100644 --- a/net-wireless/kismet/files/kismet-2005.04.1-init.d +++ b/net-wireless/kismet/files/kismet-2005.04.1-init.d @@ -1,41 +1,27 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/files/kismet-2005.04.1-init.d,v 1.1 2005/04/03 11:06:39 brix Exp $ - -# If you use this init script, you only need to run `kismet_client` to connect +# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/files/kismet-2005.04.1-init.d,v 1.2 2005/06/13 10:38:41 brix Exp $ checkconfig() { - if [ ! -e /etc/kismet.conf ] ; then - eerror "You need an /etc/kismet.conf to run kismet_server." - return 1 - elif [ -z "${WIFI_DEV}" ]; then - eerror "You must define WIFI_DEV in /etc/conf.d/kismet." - return 1 - fi - -} -checkcard() { - if [ -z "`cat /proc/net/dev | grep ${WIFI_DEV}`" ]; then - eerror "${WIFI_DEV} not found." + if [ ! -e /etc/kismet.conf ]; then + eerror "Configuration file /etc/kismet.conf not found" return 1 fi } start() { checkconfig || return 1 - checkcard || return 1 - ifconfig ${WIFI_DEV} up - ebegin "Starting kismet_server" + + ebegin "Starting kismet server" start-stop-daemon --start --quiet --pidfile /var/run/kismet_server.pid \ - --background --make-pidfile --exec /usr/bin/kismet_server -- ${KISMET_SERVER_OPTS} - eend $? + --background --make-pidfile --exec /usr/bin/kismet_server \ + -- ${KISMET_SERVER_OPTIONS} + eend ${?} } stop() { - ebegin "Stopping kismet_server" + ebegin "Stopping kismet server" start-stop-daemon --stop --quiet --pidfile /var/run/kismet_server.pid - kismet_unmonitor &> /dev/null - eend $? + eend ${?} } - |