[Pkg-voip-commits] r3218 - openser/trunk/debian

Julien Blache jblache at alioth.debian.org
Sat Mar 10 19:38:28 CET 2007


Author: jblache
Date: 2007-03-10 18:38:28 +0000 (Sat, 10 Mar 2007)
New Revision: 3218

Modified:
   openser/trunk/debian/changelog
   openser/trunk/debian/openser.init
Log:
Init script:
 - print out error messages when openser fails to start (invalid configuration)
 - no longer needs to be run as root to dump core


Modified: openser/trunk/debian/changelog
===================================================================
--- openser/trunk/debian/changelog	2007-03-10 18:29:02 UTC (rev 3217)
+++ openser/trunk/debian/changelog	2007-03-10 18:38:28 UTC (rev 3218)
@@ -11,6 +11,9 @@
   * debian/rules:
     + Always build the non-TLS flavour for Debian builds.
     + Add the new modules.
+  * debian/openser.init:
+    + Print out error messages if openser fails to start.
+    + No longer needs to be run as root to dump core.
   * debian/patches/01_sourced_scripts.dpatch:
     + Removed; merged upstream.
   * debian/patches/02_openser.cfg.dpatch:
@@ -20,7 +23,7 @@
   * debian/patches/22_OpenPKG-SA-2006.042.dpatch:
     + Removed; fixed upstream (different fix).
 
- -- Julien BLACHE <jblache at debian.org>  Sat, 10 Mar 2007 19:20:17 +0100
+ -- Julien BLACHE <jblache at debian.org>  Sat, 10 Mar 2007 19:37:07 +0100
 
 openser (1.1.1-1) unstable; urgency=low
 

Modified: openser/trunk/debian/openser.init
===================================================================
--- openser/trunk/debian/openser.init	2007-03-10 18:29:02 UTC (rev 3217)
+++ openser/trunk/debian/openser.init	2007-03-10 18:38:28 UTC (rev 3218)
@@ -38,11 +38,12 @@
 {
 	# Check if openser configuration is valid before starting the server
 	set +e
-	out=$($DAEMON -c > /dev/null 2>&1)
+	out=$($DAEMON -c 2>&1 > /dev/null)
 	retcode=$?
 	set -e
 	if [ "$retcode" != '0' ]; then
 	    echo "Not starting $DESC: invalid configuration file!"
+	    echo -e "\n$out\n"
 	    exit 1
 	fi
 }
@@ -90,14 +91,12 @@
 [ $MEMORY -le 0 ] && MEMORY=32
 
 if test "$DUMP_CORE" = "yes" ; then
-    # Ignore USER and GROUP in this case and use root,
-    # else it won't write the core file.
-    OPTIONS="-P $PIDFILE -m $MEMORY -u root -g root -w $HOMEDIR"
+    # set proper ulimit
     ulimit -c unlimited
-else
-    OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
 fi
 
+OPTIONS="-P $PIDFILE -m $MEMORY -u $USER -g $GROUP"
+
 case "$1" in
   start|debug)
 	check_openser_config




More information about the Pkg-voip-commits mailing list