[Pkg-sysvinit-commits] r319 - sysvinit/trunk/debian/initscripts

Thomas Hood jdthood-guest at costa.debian.org
Mon Nov 28 19:48:39 UTC 2005


Author: jdthood-guest
Date: 2005-11-28 19:48:39 +0000 (Mon, 28 Nov 2005)
New Revision: 319

Modified:
   sysvinit/trunk/debian/initscripts/postinst
Log:
Clean up formatting of postinst; fix bug (failing to capture return val of update-rc.d)

Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst	2005-11-28 19:42:37 UTC (rev 318)
+++ sysvinit/trunk/debian/initscripts/postinst	2005-11-28 19:48:39 UTC (rev 319)
@@ -1,9 +1,7 @@
 #! /bin/sh
 #
-# debian.postinst
+# initscripts postinst
 #
-# Version:	debian.postinst  2.85-20  07-Jun-2004  miquels at cistron.nl
-#
 
 set -e
 
@@ -15,9 +13,9 @@
 		exit 0
 		;;
 esac
+
 umask 022
 
-
 #
 # Function like update-rc.d but simpler & faster.
 # Usage: updatercd basename start|stop NN runlevel .
@@ -27,16 +25,14 @@
 #
 updatercd() {
 
-	if [ ! -f /etc/init.d/$1 ]
-	then
-		return
-	fi
+	[ -f /etc/init.d/$1 ] || return
 
-	if [ -d /usr/share/file-rc/. ] || [ -d /usr/lib/file-rc/. ] ||
-	   [ ! -d /etc/rc2.d/. ]
+	if \
+		[ -d /usr/share/file-rc/. ] \
+		|| [ -d /usr/lib/file-rc/. ] \
+		|| [ ! -d /etc/rc2.d/. ]
 	then
-		update-rc.d "$@" > /dev/null
-		return $?
+		update-rc.d "$@" >/dev/null || return $?
 	fi
 
 	base=$1
@@ -205,8 +201,10 @@
 fi
 
 # Create initial fsck log files
-for F in /var/log/fsck/checkroot /var/log/fsck/checkfs ; do
-	if [ ! -f "$F" ] ; then
+for F in /var/log/fsck/checkroot /var/log/fsck/checkfs
+do
+	if [ ! -f "$F" ]
+	then
 		echo "(Nothing has been logged yet.)" > "$F"
 		chown root:adm "$F"
 		chmod 0640 "$F"




More information about the Pkg-sysvinit-commits mailing list