X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Frpi-userland%2FS94vcfiled;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Frpi-userland%2FS94vcfiled;h=a70e0ae67d3ce3a5b455735442adcaf90644ea82;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/rpi-userland/S94vcfiled b/cirros-testvm/src-cirros/buildroot-2015.05/package/rpi-userland/S94vcfiled new file mode 100755 index 0000000..a70e0ae --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/rpi-userland/S94vcfiled @@ -0,0 +1,47 @@ +#!/bin/sh + +NAME=vcfiled +DESC="VideoCore file server daemon $NAME" +DAEMON="/usr/sbin/$NAME" +DAEMON_ARGS="" +CFGFILE="/etc/default/$NAME" +PIDFILE="/var/run/$NAME.pid" + +# Read configuration variable file if it is present +[ -r "$CFGFILE" ] && . "$CFGFILE" + +start() +{ + echo -n "Starting $DESC: " + start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS && + echo "done" || echo "failed" +} + +stop() +{ + echo -n "Stopping $DESC: " + if start-stop-daemon -K -q -R TERM/30/KILL/5 -p "$PIDFILE" -n "$NAME"; then + # This daemon does not remove its PID file when it exits. + rm -f "$PIDFILE" + echo "done" + else + echo "failed" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" >&2 + exit 1 + ;; +esac