[Pkg-sysvinit-commits] r656 - in sysvinit/trunk/debian: .
initscripts
Thomas Hood
jdthood-guest at costa.debian.org
Tue Jan 17 10:11:13 UTC 2006
Author: jdthood-guest
Date: 2006-01-17 10:11:12 +0000 (Tue, 17 Jan 2006)
New Revision: 656
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/postinst
sysvinit/trunk/debian/initscripts/preinst
Log:
Clean up initscripts preinst and postinst
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-01-17 10:03:29 UTC (rev 655)
+++ sysvinit/trunk/debian/changelog 2006-01-17 10:11:12 UTC (rev 656)
@@ -1,4 +1,4 @@
-sysvinit (2.86.ds1-11~3) unstable; urgency=low
+sysvinit (2.86.ds1-11~4) unstable; urgency=low
[ Petter Reinholdtsen ]
* Upload to unstable (Closes: #341075)
@@ -6,6 +6,7 @@
[ Thomas Hood ]
* rcS(5): Improve
* bootlogd(8): Improve; mention need for PTY support
+ * initscripts preinst and postinst: Update
* Previous release also
closes: #258290 "bootlogd: Bad file descriptor"
closes: #327865 "bootlogd stopped working"
@@ -207,7 +208,7 @@
builds
* mountvirtfs: Mount a tmpfs on /run
* mountvirtfs: Warn if mount point has stuff under it (Closes: #95390)
- * initscripts postinst: Run mountvirtfs
+ * initscripts postinst: Mount virtual filesystems
* initscripts preinst: Remove ancient /etc/init.d/boot conversion code
(Closes: #343596)
* default config files: Clean up comments
Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2006-01-17 10:03:29 UTC (rev 655)
+++ sysvinit/trunk/debian/initscripts/postinst 2006-01-17 10:11:12 UTC (rev 656)
@@ -7,7 +7,7 @@
case "$1" in
configure)
- oldver=$2
+ PREV_VER=$2
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
@@ -61,36 +61,32 @@
while [ "$1" != "." ]
do
cd /etc/rc$1.d
- ln -s ../init.d/$base $tlet$lev$base
+ ln -sf ../init.d/$base $tlet$lev$base
shift
done
shift
done
}
+#
+# Initialize rcS default file.
+#
if [ ! -f /etc/default/rcS ]
then
- #
- # Install default rcS default file.
- #
cp -p /usr/share/initscripts/default.rcS /etc/default/rcS
fi
#
-# In 2.86.ds1-10 the "mountvirtfs" script was replaced by
-# mountkernfs.sh and mountdevsubfs.sh.
+# Eliminate experimental crap
#
-update-rc.d -f mountvirtfs remove >/dev/null 2>&1 || :
-
-# Eliminate experimental crap
rm -f /etc/init.d/mountdevsubfs # NEEDED ONLY UNTIL NEXT UNSTABLE UPLOAD
update-rc.d -f mountdevsubfs remove >/dev/null 2>&1 || : # NEEDED ONLY UNTIL NEXT UNSTABLE UPLOAD
#
-# In 2.86.ds1-7 the "single" script was moved
-# We have to remove the old links before we install new ones.
+# In 2.86.ds1-7 the "single" script was moved.
+# We have to remove the old links _before_ we install new ones.
#
-if dpkg --compare-versions "$oldver" lt "2.86.ds1-7"
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-7"
then
update-rc.d -f single remove >/dev/null 2>&1 || :
fi
@@ -106,7 +102,7 @@
updatercd mountdevsubfs.sh start 4 S .
updatercd bootlogd start 5 S .
updatercd checkroot.sh start 10 S .
-# The modutils postinst doesn't do this so we do:
+# The modutils postinst doesn't do this so we do it:
updatercd modutils start 20 S .
updatercd checkfs.sh start 30 S .
updatercd mountall.sh start 35 S .
@@ -132,73 +128,40 @@
updatercd stop-bootlogd-single start 99 S .
updatercd stop-bootlogd start 99 2 3 4 5 .
-
#
# Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
-# versions. We have the same functionality in mountvirtfs.
+# versions. We have the same functionality in mount{kern,devsub}fs.sh
#
-for i in devpts.sh mountkernfs
+for F in mountkernfs devpts.sh
do
- if [ -f /etc/init.d/$i ]
- then
- rm -f /etc/init.d/$i
- update-rc.d $i remove >/dev/null 2>&1 ||:
- fi
+ rm -f /etc/init.d/$F
+ update-rc.d $F remove >/dev/null 2>&1 || :
done
#
-# Mount virtual filesystems
+# In 2.86.ds1-10 the "mountvirtfs" script was replaced by
+# mountkernfs.sh and mountdevsubfs.sh. For now the
+# /etc/init.d/mountvirtfs script is still included, though.
#
-if [ -x /etc/init.d/mountvirtfs ]
-then
- if which invoke-rc.d >/dev/null 2>&1
- then
- invoke-rc.d mountvirtfs start || :
- else
- /etc/init.d/mountvirtfs start
- fi
-fi
+update-rc.d -f mountvirtfs remove >/dev/null 2>&1 || :
-# Create /dev/pts, /dev/shm directories
-if [ "$(uname -s)" = Linux ]
-then
- #
- # Only create /dev/{pts,shm} if /dev is on the
- # root file system. If some package has mounted a
- # seperate /dev (ramfs from udev, devfs) it is
- # responsible for the presence of those subdirs.
- #
- if ! mountpoint -q /dev
- then
- [ -d /dev/pts ] || mkdir --mode=755 /dev/pts
- [ -d /dev/shm ] || mkdir --mode=755 /dev/shm
- fi
-fi
-
-if [ -x /etc/init.d/mountdevsubfs ]
-then
- if which invoke-rc.d >/dev/null 2>&1
- then
- invoke-rc.d mountdevsubfs start || :
- else
- /etc/init.d/mountdevsubfs start
- fi
-fi
-
+#
# Create initial log files
+#
+[ "$PREV_VER" ] || chmod 755 /var/log/fsck
for F in /var/log/dmesg /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"
+ echo "(Nothing has been logged yet.)" > "$F" || :
+ chown root:adm "$F" || :
+ chmod 640 "$F" || :
fi
done
#
# Set up nologin symlink so that dynamic-login-disabling will work
-# (if DELAYLOGIN is set to "yes")
+# (when DELAYLOGIN is set to "yes")
#
if [ ! -L /etc/nologin ] && [ ! -e /etc/nologin ]
then
@@ -207,7 +170,7 @@
fi
#
-# Set up motd stuff
+# Set up motd stuff, putting variable file in /var/run/
#
if [ ! -f /etc/motd.tail ]
then
@@ -238,4 +201,48 @@
fi
fi
-exit 0
+#
+# Mount kernel virtual filesystems
+#
+if [ -x /etc/init.d/mountkernfs.sh ]
+then
+ if which invoke-rc.d >/dev/null 2>&1
+ then
+ invoke-rc.d mountkernfs.sh start || :
+ else
+ /etc/init.d/mountkernfs.sh start
+ fi
+fi
+
+#
+# Create /dev/pts, /dev/shm directories
+#
+if [ "$(uname -s)" = Linux ]
+then
+ #
+ # Only create /dev/{pts,shm} if /dev is on the
+ # root file system. If some package has mounted a
+ # seperate /dev (ramfs from udev, devfs) it is
+ # responsible for the presence of those subdirs.
+ #
+ if ! mountpoint -q /dev
+ then
+ [ -d /dev/pts ] || { mkdir --mode=755 /dev/pts ; chown root:root /dev/pts ; }
+ [ -d /dev/shm ] || { mkdir --mode=755 /dev/shm ; chown root:root /dev/shm ; }
+ fi
+fi
+
+#
+# Mount virtual filesystems under /dev
+#
+if [ -x /etc/init.d/mountdevsubfs.sh ]
+then
+ if which invoke-rc.d >/dev/null 2>&1
+ then
+ invoke-rc.d mountdevsubfs.sh start || :
+ else
+ /etc/init.d/mountdevsubfs.sh start
+ fi
+fi
+
+:
Modified: sysvinit/trunk/debian/initscripts/preinst
===================================================================
--- sysvinit/trunk/debian/initscripts/preinst 2006-01-17 10:03:29 UTC (rev 655)
+++ sysvinit/trunk/debian/initscripts/preinst 2006-01-17 10:11:12 UTC (rev 656)
@@ -39,10 +39,14 @@
if [ "$2" ] && dpkg --compare-versions "$2" lt "2.86.ds1-10" ; then
eliminate_conffile "/etc/init.d/bootclean.sh"
fi
+ #
+ # Move conflicting log _file_ if present
+ #
+ [ -f /var/log/fsck ] && mv -f /var/log/fsck /var/log/fsck.dpkg-old
;;
abort-upgrade)
exit 0
;;
esac
-exit 0
+:
More information about the Pkg-sysvinit-commits
mailing list