tag 473202 patch
thanks

patch attached.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baum...@progress-technologies.net
Internet:       http://people.progress-technologies.net/~daniel.baumann/
>From fa14fe833ae51373cb922480d40bce3fb20c4c7b Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baum...@progress-technologies.net>
Date: Thu, 30 Dec 2010 16:51:48 +0100
Subject: [PATCH] Don't reenable hwclock initscript if it was disabled (Closes: #473202).

---
 debian/util-linux.postinst |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/debian/util-linux.postinst b/debian/util-linux.postinst
index b536eac..fa2f2d3 100644
--- a/debian/util-linux.postinst
+++ b/debian/util-linux.postinst
@@ -8,27 +8,31 @@ update-alternatives --install /usr/bin/pager pager /bin/more 50 \
 update-alternatives --install /usr/bin/pager pager /usr/bin/pg 10 \
   --slave /usr/share/man/man1/pager.1.gz pager.1.gz /usr/share/man/man1/pg.1.gz
 
-#
-#	Check if links to hwclock.sh are present in runlevel "6".
-#	If not, remove the ones from runlevel "S" so that
-#	update-rc.d will do it's job.
-#
-if [ ! -f /etc/rc6.d/???hwclock.sh ] && [ ! -f /etc/rc0.d/???hwclock.sh ]
+# Don't reenable hwclock if it was disabled
+if [ -f /etc/rcS.d/???hwclock.sh ]
 then
-	rm -f /etc/rcS.d/???hwclock.sh
-fi
+	#
+	#	Check if links to hwclock.sh are present in runlevel "6".
+	#	If not, remove the ones from runlevel "S" so that
+	#	update-rc.d will do it's job.
+	#
+	if [ ! -f /etc/rc6.d/???hwclock.sh ] && [ ! -f /etc/rc0.d/???hwclock.sh ]
+	then
+		rm -f /etc/rcS.d/???hwclock.sh
+	fi
 
-# hwclock works on all Linux architectures, except s390 (and s390x, of course).
-if [ "$(uname -s)" = "Linux" ]; then
-    model=$(uname -m)
-    if [ ${model%x} != "s390" ]; then
-        update-rc.d -f hwclock.sh remove 2>/dev/null > /dev/null
-        update-rc.d hwclock.sh start 11 S . stop 25 0 6 . > /dev/null
-        update-rc.d -f hwclockfirst.sh remove 2>/dev/null > /dev/null
-	if [ -f /etc/init.d/hwclockfirst.sh ]; then
-	  update-rc.d hwclockfirst.sh start 8 S . > /dev/null
+	# hwclock works on all Linux architectures, except s390 (and s390x, of course).
+	if [ "$(uname -s)" = "Linux" ]; then
+	    model=$(uname -m)
+	    if [ ${model%x} != "s390" ]; then
+	        update-rc.d -f hwclock.sh remove 2>/dev/null > /dev/null
+	        update-rc.d hwclock.sh start 11 S . stop 25 0 6 . > /dev/null
+	        update-rc.d -f hwclockfirst.sh remove 2>/dev/null > /dev/null
+		if [ -f /etc/init.d/hwclockfirst.sh ]; then
+		  update-rc.d hwclockfirst.sh start 8 S . > /dev/null
+		fi
+	    fi
 	fi
-    fi
 fi
 
 if [ -x /usr/sbin/update-mime ]; then
-- 
1.7.2.3

Reply via email to