add init script for cdemud
This commit is contained in:
parent
c7a6a954f6
commit
a83cd070e9
1 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue