init scripts from rhubarb-pi.sf.net
This commit is contained in:
25
cde/contrib/rc/openbsd/dtlogin
Executable file
25
cde/contrib/rc/openbsd/dtlogin
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/ksh
|
||||
|
||||
daemon="/usr/dt/bin/dtlogin"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_reload=NO
|
||||
|
||||
if [ -n "${INRC}" ]; then
|
||||
# on boot: make sure we don't hang in _rc_wait
|
||||
_rc_wait() {
|
||||
return 0
|
||||
}
|
||||
# on boot: wait for ttys to be initialized
|
||||
rc_start() {
|
||||
( local i=0
|
||||
while ! pgrep -qf "^/usr/libexec/getty "; do
|
||||
sleep 1
|
||||
[ $((i++)) -ge 10 ] && return 1
|
||||
done
|
||||
${rcexec} "${daemon} ${daemon_flags}" ) &
|
||||
}
|
||||
fi
|
||||
|
||||
rc_cmd $1
|
||||
Reference in New Issue
Block a user