Package: nslu2-utils
Version: 20080403-3.1
Severity: wishlist
Tags: patch
Here is the patch used in the NMU I just uplodaed.
diff -urN nslu2-utils-20080403/debian/changelog
nslu2-utils-20080403-pere/debian/changelog
--- nslu2-utils-20080403/debian/changelog 2008-09-29 15:36:47.000000000
+0000
+++ nslu2-utils-20080403-pere/debian/changelog 2009-09-05 17:41:18.000000000
+0000
@@ -1,3 +1,12 @@
+nslu2-utils (20080403-3.1) unstable; urgency=low
+
+ * Non-maintainer upload to solve release goal bug.
+ * Add missing LSB headers to init.d scripts, and rewrite the init.d script
+ handling to only start or stop in a given runlevel (Closes: #507545).
+ * Fix misspelled ${shlibs:Depends} in debian/control (Closes: #511763).
+
+ -- Petter Reinholdtsen <[email protected]> Sat, 05 Sep 2009 17:32:38 +0000
+
nslu2-utils (20080403-3) unstable; urgency=low
[ Martin Michlmayr ]
diff -urN nslu2-utils-20080403/debian/control
nslu2-utils-20080403-pere/debian/control
--- nslu2-utils-20080403/debian/control 2008-06-22 10:37:55.000000000 +0000
+++ nslu2-utils-20080403-pere/debian/control 2009-09-05 17:34:37.000000000
+0000
@@ -9,7 +9,7 @@
Package: nslu2-utils
Architecture: arm armel armeb
-Depends: ${misc:Depends}, ${shlib:Depends}, slugimage, devio, flash-kernel (>=
1.8)
+Depends: ${misc:Depends}, ${shlibs:Depends}, slugimage, devio, flash-kernel
(>= 1.8)
Suggests: beep
Conflicts: initramfs-tools (<< 0.60)
Description: utilities and init scripts for the Linksys NSLU2
diff -urN nslu2-utils-20080403/debian/nslu2-rtc.init
nslu2-utils-20080403-pere/debian/nslu2-rtc.init
--- nslu2-utils-20080403/debian/nslu2-rtc.init 2008-06-22 10:37:55.000000000
+0000
+++ nslu2-utils-20080403-pere/debian/nslu2-rtc.init 2009-09-05
17:32:08.000000000 +0000
@@ -1,2 +1,20 @@
#!/bin/sh
-modprobe rtc-dev
+### BEGIN INIT INFO
+# Provides: nslu2-rtc
+# Required-Start:
+# Required-Stop:
+# Should-Start: udev
+# X-Start-Before: hwclock
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Load kernel module for the RTC device interface.
+# Description: Load kernel module for the RTC device interface.
+### END INIT INFO
+
+case "$1" in
+ start)
+ modprobe rtc-dev
+ ;;
+ stop|restart|force-reload|*)
+ ;;
+esac
diff -urN nslu2-utils-20080403/debian/preinst
nslu2-utils-20080403-pere/debian/preinst
--- nslu2-utils-20080403/debian/preinst 1970-01-01 00:00:00.000000000 +0000
+++ nslu2-utils-20080403-pere/debian/preinst 2009-09-05 17:32:08.000000000
+0000
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Remove a no-longer used conffile. From
+# http://wiki.debian.org/DpkgConffileHandling
+rm_conffile() {
+ local PKGNAME="$1"
+ local CONFFILE="$2"
+
+ [ -e "$CONFFILE" ] || return 0
+
+ local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+ local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
+ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+ if [ "$md5sum" != "$old_md5sum" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+}
+
+case "$1" in
+install|upgrade)
+ if dpkg --compare-versions "$2" le "20080403-3" ; then
+ rm_conffile nslu2-utils "/etc/init.d/zleds"
+ rm_conffile nslu2-utils "/etc/init.d/leds_startup"
+ fi
+esac
+
+#DEBHELPER#
diff -urN nslu2-utils-20080403/debian/rules
nslu2-utils-20080403-pere/debian/rules
--- nslu2-utils-20080403/debian/rules 2008-06-22 10:37:55.000000000 +0000
+++ nslu2-utils-20080403-pere/debian/rules 2009-09-05 17:32:08.000000000
+0000
@@ -17,16 +17,25 @@
dh_install initramfs-tools usr/share
dh_install files/leds usr/bin
dh_install nslu2-flashkernel usr/sbin
- dh_install files/initscripts/zleds files/initscripts/rmrecovery \
- files/initscripts/leds_startup etc/init.d
+ dh_install files/initscripts/rmrecovery etc/init.d
+ set -e ; tmpdir=debian/nslu2-utils; for runlvl in S 1 2 3 4 5 ; do \
+ startscript="etc/init.d/leds-lvl$$runlvl" ; \
+ stopscript="etc/init.d/zleds-stop-lvl$$runlvl" ; \
+ cp files/initscripts/leds $$tmpdir/$$startscript ; \
+ cp files/initscripts/zleds-stop $$tmpdir/$$stopscript ; \
+ for file in $$startscript $$stopscript ; do \
+ sed s/@LVL@/$$runlvl/ < $$tmpdir/$$file > foo \
+ && mv foo $$tmpdir/$$file ; \
+ done ; \
+ dh_installinit --no-start --onlyscripts \
+ --name=leds-lvl$$runlvl -- start 1 $$runlvl . ; \
+ dh_installinit --no-start --onlyscripts \
+ --name=zleds-stop-lvl$$runlvl -- start 99 $$runlvl . ; \
+ done
dh_installdirs etc/default
cp files/initscripts/rmrecovery.default
debian/nslu2-utils/etc/default/rmrecovery
- dh_installinit --no-start --onlyscripts --name=zleds \
- -- start 99 S 1 2 3 4 5 . stop 5 0 1 2 3 4 5 6 .
dh_installinit --no-start --onlyscripts --name=rmrecovery \
-- start 99 1 2 3 4 5 .
- dh_installinit --no-start --onlyscripts --name=leds_startup \
- -- start 1 1 2 3 4 5 .
dh_installinit --no-start --name=nslu2-rtc \
-- start 10 S .
dh_installudev --name=nslu2-rtc
diff -urN nslu2-utils-20080403/files/initscripts/leds
nslu2-utils-20080403-pere/files/initscripts/leds
--- nslu2-utils-20080403/files/initscripts/leds 1970-01-01 00:00:00.000000000
+0000
+++ nslu2-utils-20080403-pere/files/initscripts/leds 2009-09-05
17:32:08.000000000 +0000
@@ -0,0 +1,53 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: le...@lvl@
+# Required-Start: $local_fs
+# Required-Stop:
+# Default-Start: S 1 2 3 4 5
+# Default-Stop:
+# Short-Description: Start led blinking
+# Description: This script is executed at the start of
+# each run-level transition. It should be
+# the first 'start' script.
+### END INIT INFO
+#
+# 'start' indicates the start of a runlevel change
+# 'stop' at the end of the runlevel change - we are in the new
+# runlevel.
+#
+# state outputs 'system', 'user' etc according the the nature of
+# the runlevel it is passed (the *new* runlevel is used).
+state(){
+ case "$1" in
+ S|N) echo system;;
+ 0|6) echo shutdown;;
+ 1) echo singleuser;;
+ 2|3|4|5) echo user;;
+ *) echo "led change: $runlevel: runlevel unknown" >&2
+ echo system;;
+ esac
+}
+
+# trumpet "beeps" an announcement on systems with such support.
+l=120 # Long beep time
+s=40 # Try to keep a 3:1 ratio
+trumpet(){
+ case "$1" in
+ k) leds beep -l $l; leds beep -l $s; leds beep -l $l;;
+ n) leds beep -l $l; leds beep -l $s;;
+ *) leds beep;;
+ esac
+}
+
+case "$1" in
+stop) leds "$(state "$runlevel")"
+ if [ "$(state "$runlevel")" = "user" ]; then
+ trumpet "k"
+ fi
+ ;;
+start) leds boot "$(state "$runlevel")"
+ ;;
+restart|force-reload|*)
+ echo "led change: $1: command ignored" >&2
+ ;;
+esac
diff -urN nslu2-utils-20080403/files/initscripts/leds_startup
nslu2-utils-20080403-pere/files/initscripts/leds_startup
--- nslu2-utils-20080403/files/initscripts/leds_startup 2008-06-22
10:37:56.000000000 +0000
+++ nslu2-utils-20080403-pere/files/initscripts/leds_startup 1970-01-01
00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-#!/bin/sh
-# Bug fix: during the initial boot sysvinit sets PREVLEVEL to
-# nothing in rcS and to 'N' in the transition from rcS to the
-# user state. This script runs on that transition and, if
-# the PREVLEVEL is 'N', sets 'previous' (as in /etc/init.d/rc)
-# to 'S'
-if test "$PREVLEVEL" = N
-then
- previous=S exec /etc/init.d/zleds stop
-fi
-exit 0
diff -urN nslu2-utils-20080403/files/initscripts/rmrecovery
nslu2-utils-20080403-pere/files/initscripts/rmrecovery
--- nslu2-utils-20080403/files/initscripts/rmrecovery 2008-06-22
10:37:56.000000000 +0000
+++ nslu2-utils-20080403-pere/files/initscripts/rmrecovery 2009-09-05
17:32:08.000000000 +0000
@@ -1,7 +1,29 @@
#!/bin/sh
-# Run to remove /.recovery if the boot seems to have succeeded
-RMRECOVERY=yes
-. /etc/default/rmrecovery || true
-if [ "$RMRECOVERY" != no ]; then
- rm -f /.recovery
-fi
+### BEGIN INIT INFO
+# Provides: rmrecovery
+# Required-Start: $remote_fs $all
+# Required-Stop:
+# Default-Start: 1 2 3 4 5
+# Default-Stop:
+# Short-Description: Remove OpenSlug recovery file on successfull boot
+# Description: If instead of booting using the Debian initrd, you are
+# using the OpenSlug firmware to boot Debian from a
+# USB drive on your slug, then it creates a
+# /.recovery file during boot, and unless this file
+# is removed, the next boot will be back into the
+# openslug system. This script removes this file on
+# each boot, so that Debian will boot each time.
+### END INIT INFO
+
+case "$1" in
+ start)
+ # Run to remove /.recovery if the boot seems to have succeeded
+ RMRECOVERY=yes
+ . /etc/default/rmrecovery || true
+ if [ "$RMRECOVERY" != no ]; then
+ rm -f /.recovery
+ fi
+ ;;
+ stop|restart|force-reload|*)
+ ;;
+esac
diff -urN nslu2-utils-20080403/files/initscripts/zleds
nslu2-utils-20080403-pere/files/initscripts/zleds
--- nslu2-utils-20080403/files/initscripts/zleds 2008-06-22
10:37:56.000000000 +0000
+++ nslu2-utils-20080403-pere/files/initscripts/zleds 1970-01-01
00:00:00.000000000 +0000
@@ -1,45 +0,0 @@
-#!/bin/sh
-#
-# This script is executed at the start and end of each run-level
-# transition. It is the first 'stop' script and the last 'start'
-# script.
-#
-# 'stop' indicates the start of a runlevel change
-# 'start' at the end of the runlevel change - we are in the new
-# runlevel.
-#
-# state outputs 'system', 'user' etc according the the nature of
-# the runlevel it is passed (the *new* runlevel is used).
-state(){
- case "$1" in
- S|N) echo system;;
- 0|6) echo shutdown;;
- 1) echo singleuser;;
- 2|3|4|5) echo user;;
- *) echo "led change: $runlevel: runlevel unknown" >&2
- echo system;;
- esac
-}
-
-# trumpet "beeps" an announcement on systems with such support.
-l=120 # Long beep time
-s=40 # Try to keep a 3:1 ratio
-trumpet(){
- case "$1" in
- k) leds beep -l $l; leds beep -l $s; leds beep -l $l;;
- n) leds beep -l $l; leds beep -l $s;;
- *) leds beep;;
- esac
-}
-
-case "$1" in
-start) leds "$(state "$runlevel")"
- if [ "$(state "$runlevel")" = "user" ]; then
- trumpet "k"
- fi
- ;;
-stop) leds boot "$(state "$runlevel")"
- ;;
-*) echo "led change: $1: command ignored" >&2
- ;;
-esac
diff -urN nslu2-utils-20080403/files/initscripts/zleds-stop
nslu2-utils-20080403-pere/files/initscripts/zleds-stop
--- nslu2-utils-20080403/files/initscripts/zleds-stop 1970-01-01
00:00:00.000000000 +0000
+++ nslu2-utils-20080403-pere/files/initscripts/zleds-stop 2009-09-05
17:32:08.000000000 +0000
@@ -0,0 +1,20 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: leds-st...@lvl@
+# Required-Start: $local_fs $all
+# Required-Stop:
+# Default-Start: S 1 2 3 4 5
+# Default-Stop:
+# Short-Description: Stop led blinking
+# Description: This script is executed at the end of
+# each run-level transition. It should be
+# the last 'start' script.
+### END INIT INFO
+
+case "$1" in
+start) /etc/init.d/leds stop
+ ;;
+restart|force-reload|*)
+ echo "led change: $1: command ignored" >&2
+ ;;
+esac
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]