El mié, 12-08-2009 a las 20:25 +0200, Petter Reinholdtsen escribió:
> Package:  p910nd
> Version:  0.93-1
> Severity: important
> Tags:     patch
> User:     initscripts-ng-de...@lists.alioth.debian.org
> Usertags: incorrect-runlevels incorrect-dependency
> 
> With dependency based boot sequencing, I discovered what I believe is
> a bug in the init.d/p910nd script.  The runlevel list state that it
> should stop in runlevel 2 and not start in runlevel 4.  This is
> inconsistent with the Debian runlevels and the arguments used for
> update-rc.d.  Also, the dependencies are not correct.  It uses files
> in /usr/, and thus need to depend on $remote_fs.


Fixed, I'm not a DD, Can you sponsor this upload?

You can build the package with this:

git clone http://tcosproject.org/git/p910nd.git
cd p910nd
git-buildpackage

Or you can build the package with 0.93-1 and the patch attached.


Greetings
-- 
http://soleup.eup.uva.es/mariodebian
diff --git a/debian/changelog b/debian/changelog
index bedabec..4dde2f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+p910nd (0.93-2) unstable; urgency=low
+
+  * Fix debian/p910nd.init:
+    - Rename PIDFILE p910nd => p9100d
+    - Set verbose by default 
+  * Standards-Version bumped to 3.8.2:
+    debian/p910nd.init fixed, /var/run and /var/lock/p190nd created on init.d
+    script, since these 2 dirs could be mounted as a temporary filesystem.
+  * debian/p910nd.init:
+    - Fix LSB start/stop and depends headers (Closes: #541250)
+
+ -- Mario Izquierdo (mariodebian) <mariodeb...@gmail.com>  Wed, 12 Aug 2009 20:46:09 +0200
+
 p910nd (0.93-1) unstable; urgency=low
 
   * Initial version (Closes: #514615)
diff --git a/debian/control b/debian/control
index b04991d..a8540e8 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
 Priority: extra
 Maintainer: Mario Izquierdo (mariodebian) <mariodeb...@gmail.com>
 Build-Depends: cdbs, debhelper (>= 7), dpatch, libwrap0-dev
-Standards-Version: 3.8.0
+Standards-Version: 3.8.2
 Homepage: http://p910nd.sourceforge.net/
 
 Package: p910nd
diff --git a/debian/dirs b/debian/dirs
index f7f4c81..236670a 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,2 +1 @@
 usr/sbin
-var/lock/p910nd
diff --git a/debian/p910nd.init b/debian/p910nd.init
index 0490380..8f2716f 100644
--- a/debian/p910nd.init
+++ b/debian/p910nd.init
@@ -1,12 +1,12 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          p910nd
-# Required-Start:    $syslog
+# Required-Start:    $remote_fs $syslog $network
 # Should-Start:
-# Required-Stop:     $syslog
+# Required-Stop:     $remote_fs $syslog
 # Should-Stop:
-# Default-Start:     3 5
-# Default-Stop:      0 1 2 6
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
 # Short-Description: p910nd daemon providing network printer access
 # Description:       Start p910nd to provide port 9100+n printer service
 ### END INIT INFO
@@ -18,15 +18,19 @@
 
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Network printer access"
+DESC="network print daemon"
 NAME=p910nd
 DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/p9100d.pid
 SCRIPTNAME=/etc/init.d/$NAME
 
 # Exit if the package is not installed
 [ -x "$DAEMON" ] || exit 0
 
+# create /var/run and /var/lock/p910nd (Debian policy 3.8.1)
+[ ! -d /var/run ] && mkdir -p /var/run
+[ ! -d /var/lock/p910nd ] && mkdir -p /var/lock/p910nd
+
 P910ND_OPTS=""
 P910ND_NUM=""
 
@@ -88,21 +92,24 @@ do_stop()
 case "$1" in
   start)
 	# disable start
-	[ "$P910ND_START" != "1" ] && exit 0
+	if [ "$P910ND_START" != "1" ]; then
+            log_warning_msg "Not starting p910nd daemon. Please edit /etc/default/p910nd first."
+            exit 0
+        fi
 
-	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	log_daemon_msg "Starting $DESC" "$NAME"
 	do_start
 	case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+		0|1) log_end_msg 0 ;;
+		2)   log_end_msg 1 ;;
 	esac
 	;;
   stop)
-	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	log_daemon_msg "Stopping $DESC" "$NAME"
 	do_stop
 	case "$?" in
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+		0|1) log_end_msg 0 ;;
+		2)   log_end_msg 1 ;;
 	esac
 	;;
   restart|force-reload)

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

Reply via email to