updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ngetty / ngetty.rcd
blobe0440eade2c6900a32f20484dee1c3992bea7224
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/ngetty
7 PID=`pidof -o %PPID /sbin/ngetty`
8 case $1 in
9 start)
10 stat_busy "Starting ngetty"
11 [ -z "$PID" ] && /sbin/ngetty $NGETTY_TTYS &
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon ngetty
19 stop)
20 stat_busy "Stopping ngetty"
21 killall ngetty
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 stat_done
26 rm_daemon ngetty
30 echo "Usage: $0 start|stop"
31 esac