[Pkg-voip-commits] r2103 - openser/trunk/debian
Julien Blache
jblache at costa.debian.org
Wed Jul 26 08:39:43 UTC 2006
Author: jblache
Date: 2006-07-26 08:39:42 +0000 (Wed, 26 Jul 2006)
New Revision: 2103
Modified:
openser/trunk/debian/changelog
openser/trunk/debian/openser.init
Log:
Do not start OpenSER in the start target if fork=no is specified in the config file, so as to not break the boot process.
Modified: openser/trunk/debian/changelog
===================================================================
--- openser/trunk/debian/changelog 2006-07-25 07:28:27 UTC (rev 2102)
+++ openser/trunk/debian/changelog 2006-07-26 08:39:42 UTC (rev 2103)
@@ -1,8 +1,11 @@
openser (1.1.0-2) UNRELEASED; urgency=low
* NOT RELEASED YET
+ * debian/openser.init:
+ + Do not start OpenSER in the start target if fork=no is specified in
+ the config file, so as to not break the boot process.
- -- Julien BLACHE <jblache at debian.org> Wed, 12 Jul 2006 15:08:27 +0200
+ -- Julien BLACHE <jblache at debian.org> Wed, 26 Jul 2006 10:38:27 +0200
openser (1.1.0-1) unstable; urgency=low
Modified: openser/trunk/debian/openser.init
===================================================================
--- openser/trunk/debian/openser.init 2006-07-25 07:28:27 UTC (rev 2102)
+++ openser/trunk/debian/openser.init 2006-07-26 08:39:42 UTC (rev 2103)
@@ -12,7 +12,6 @@
# adapted for openser by Daniel-Constantin Mierla <daniel at voice-system.ro>
# $Id: openser.init,v 1.1.1.1.4.3 2006/02/02 16:01:58 dan_pascu Exp $
-
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/openser
NAME=openser
@@ -22,6 +21,16 @@
DEFAULTS=/etc/default/openser
RUN_OPENSER=no
+# Do not start openser if fork=no is set in the config file
+# otherwise the boot process will just stop
+check_fork ()
+{
+ if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" /etc/openser/openser.cfg; then
+ echo "Not starting $DESC: fork=no specified in config file; run /etc/init.d/openser debug instead"
+ exit 1
+ fi
+}
+
check_openser_config ()
{
# Check if openser configuration is valid before starting the server
@@ -87,10 +96,14 @@
fi
case "$1" in
- start)
+ start|debug)
check_openser_config
create_radius_seqfile
+ if [ "$1" != "debug" ]; then
+ check_fork
+ fi
+
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- $OPTIONS || echo -n " already running"
@@ -116,7 +129,7 @@
;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|debug}" >&2
exit 1
;;
esac
More information about the Pkg-voip-commits
mailing list