add init script for cdemud

for/master
Daniel Mierswa 2009-08-20 20:01:28 +02:00
parent c7a6a954f6
commit a83cd070e9
1 changed files with 32 additions and 0 deletions

View File

@ -1,5 +1,7 @@
require cdemu-common [ name=cdemu-daemon autogen=true ]
export_exlib_phases src_install
SLOT="0"
DEPENDENCIES="
@ -15,3 +17,33 @@ DEPENDENCIES="
app-emulation/vhba-module
"
cdemud_src_install() {
default
hereinitd cdemud <<EOF
#!/sbin/runscript
depend() {
after logger
need dbus
}
start() {
ebegin "Starting cdemu daemon"
cdemud \${CDEMUD_OPTS} -d -p /var/run/cdemud.pid
eend \$?
}
stop() {
ebegin "Stopping cdemu daemon"
cdemud \${CDEMUD_OPTS} -k -p /var/run/cdemud.pid
eend \$?
}
EOF
hereconfd cdemud <<EOF
# options passed to the cdemud
#CDEMUD_OPTS=--num-devices=10
EOF
}