buildrootschalter/package/rpi-userland/S94vcfiled
Benoît Thébaudeau 997c17a84c rpi-userland: Fix vcfiled startup
The VideoCore file server daemon startup script installed from this package is
not compatible with BuildRoot (because of its naming and other Debian
dependencies), which prevented vcfiled from starting. Hence, prevent this
package from installing its vcfiled startup script, and add a configuration
option to install a vcfiled SysV init script suitable for BuildRoot.

[Peter: tweak help text as suggested by Yann]
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-09-28 21:22:41 +02:00

48 lines
814 B
Bash
Executable File

#!/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"
do_start()
{
echo -n "Starting $DESC: "
start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS &&
echo "done" || echo "failed"
}
do_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)
do_start
;;
stop)
do_stop
;;
restart|reload)
do_stop
do_start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}" >&2
exit 1
;;
esac