* Added example configuration files
* Fix for logrotate crashing sasc-ng process
+ * Add commented-out CONFIGURED variable in /etc/default/sasc-ng
+ * Init scripts gives more detailed messages when not starting daemon
- -- Jan-Pascal van Best <janpascal@vanbest.org> Mon, 28 Jan 2013 09:32:21 +0100
+ -- Jan-Pascal van Best <janpascal@vanbest.org> Mon, 28 Jan 2013 09:44:27 +0100
sasc-ng (620-4) local; urgency=low
# Default settings for sasc-ng. This file is sourced by /bin/sh from
# /etc/init.d/sasc-ng-common.
+# Uncomment the following line when you've configured sasc-ng using
+# this file and the files in /etc/sasc-ng
+#CONFIGURED=yes
+
PIDFILE=/var/run/$NAME.pid
LOGFILE=/var/log/$NAME.log
DESC="sasc-ng"
NAME=sasc-ng
DAEMON=/usr/sbin/$NAME
-SCRIPTNAME=/etc/init.d/sasc-ng-common
+SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Exit if the module is not available
-modprobe --dry-run --quiet dvbloopback || exit 0
+modprobe --dry-run --quiet dvbloopback || {
+ echo "Error: dvbloopback module not found"
+ echo "Please install the sasc-ng-daemon package for your"
+ echo "current kernel"
+ exit 0
+}
# Exit if the kernel has no 'sasc' in its version name,
# indicating it's not patched for sasc
# TODO: check for exact kernel version
-uname -v | grep -q sasc || exit 0
+uname -v | grep -q sasc || {
+ echo "Error: Not running a kernel patched for sasc-ng"
+ echo "Please reboot into a kernel with sasc in its version string"
+ exit 0
+}
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+if [ "$CONFIGURED" != "yes" ]; then
+ echo "Error: sasc-ng not configured, exiting"
+ echo "Please modify the files in /etc/sasc-ng and /etc/default/sasc-ng"
+ exit 0
+fi
+
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh