[arch-commits] CVS update of extra/network/martian-utils (martian.rc.d)
Jan de Groot
jgc at archlinux.org
Mon Jun 4 22:04:27 UTC 2007
Date: Monday, June 4, 2007 @ 18:04:27
Author: jgc
Path: /home/cvs-extra/extra/network/martian-utils
Added: martian.rc.d (1.1)
Add missing file
--------------+
martian.rc.d | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Index: extra/network/martian-utils/martian.rc.d
diff -u /dev/null extra/network/martian-utils/martian.rc.d:1.1
--- /dev/null Mon Jun 4 18:04:27 2007
+++ extra/network/martian-utils/martian.rc.d Mon Jun 4 18:04:27 2007
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Martian Drivers"
+ martian_modem --daemon > /dev/null 2>&1 &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon martian
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping SL-Modem Drivers"
+ killall -9 martian_modem
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon martian
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage $0 {start|stop|restart}"
+ ;;
+esac
More information about the arch-commits
mailing list