[Pkg-sysvinit-commits] r1551 - in sysvinit/trunk/debian: . initscripts sysv-rc
Petter Reinholdtsen
pere at alioth.debian.org
Sun Jul 26 11:08:55 UTC 2009
Author: pere
Date: 2009-07-26 11:08:54 +0000 (Sun, 26 Jul 2009)
New Revision: 1551
Added:
sysvinit/trunk/debian/initscripts.copyright
sysvinit/trunk/debian/initscripts.postinst
sysvinit/trunk/debian/initscripts.postrm
sysvinit/trunk/debian/initscripts.preinst
sysvinit/trunk/debian/sysv-rc.copyright
sysvinit/trunk/debian/sysv-rc.postrm
Removed:
sysvinit/trunk/debian/initscripts/copyright
sysvinit/trunk/debian/initscripts/postinst
sysvinit/trunk/debian/initscripts/postrm
sysvinit/trunk/debian/initscripts/preinst
sysvinit/trunk/debian/sysv-rc/copyright
sysvinit/trunk/debian/sysv-rc/postrm
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/rules
Log:
Move copyright, preinst, postinst and postrm files for initscripts
and sysv-rc to debian/ to make the build system closer to other
source packages.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/changelog 2009-07-26 11:08:54 UTC (rev 1551)
@@ -7,6 +7,9 @@
* Drop the stop calls for K11mountoverflowtmp in runlevels 0 and 6.
The umountfs script will take care of the task (Closes: 526733)
* Remove setting of unused makefile variable LIBC6 from rules.
+ * Move copyright, preinst, postinst and postrm files for initscripts
+ and sysv-rc to debian/ to make the build system closer to other
+ source packages.
[ Kel Modderman ]
* Allow forcefsck on kernel cmdline to have same effect as touching
Deleted: sysvinit/trunk/debian/initscripts/copyright
===================================================================
--- sysvinit/trunk/debian/initscripts/copyright 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/initscripts/copyright 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,31 +0,0 @@
-This package contains the scripts that are executed at start and
-shutdown of Debian systems.
-
-This package is built from the `sysvinit' source package. Please
-consult the copyright file of the sysvinit package for the location of
-the upstream sources of the sysvinit package. Debian-specific files
-for sysvinit, such as these initscripts, are maintained by the members
-of the pkg-sysvinit project at alioth.debian.org.
-
- http://alioth.debian.org/projects/pkg-sysvinit
-
-Copyright 1997-2005 Miquel van Smoorenburg <miquels at cistron.nl> and
-the members pkg-sysvinit project.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA
-
-On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL-2'.
Deleted: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/initscripts/postinst 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,327 +0,0 @@
-#! /bin/sh
-#
-# initscripts postinst
-#
-
-set -e
-
-case "$1" in
- configure)
- PREV_VER=$2
- ;;
- abort-upgrade|abort-remove|abort-deconfigure)
- exit 0
- ;;
-esac
-
-umask 022
-
-#
-# Function like update-rc.d but simpler & faster.
-# Usage: updatercd basename start|stop NN runlevel .
-#
-# Heuristic: use the real update-rc.d if file-rc or insserv is
-# detected, or if the /etc/rc2.d directory is not present.
-#
-updatercd() {
-
- [ -f /etc/init.d/$1 ] || return 0
-
- if \
- [ -d /usr/share/file-rc/. ] \
- || [ -d /usr/lib/file-rc/. ] \
- || [ -d /usr/share/insserv/. ] \
- || [ ! -d /etc/rc2.d/. ]
- then
- # Funniness on next line is because we are running with set -e
- update-rc.d "$@" >/dev/null && return 0 || return $?
- fi
-
- base=$1
- shift
-
- tmp="$(echo /etc/rc?.d/[SK]??$base)"
- case "$tmp" in
- "/etc/rc?.d/[SK]??$base") : ;;
- *) return ;;
- esac
-
- while [ "$1" != "" ]
- do
- if [ "$1" = stop ]
- then
- tlet=K
- else
- tlet=S
- fi
- case "$2" in
- ?) lev=0$2 ;;
- *) lev=$2 ;;
- esac
- shift 2
- while [ "$1" != "." ]
- do
- cd /etc/rc$1.d
- ln -sf ../init.d/$base $tlet$lev$base
- shift
- done
- shift
- done
-}
-
-chrooted() {
- if [ -r /proc/1/root ]; then
- return 1
- fi
- return 0
-}
-
-#
-# Initialize rcS default file.
-#
-if [ ! -f /etc/default/rcS ]
-then
- cp -p /usr/share/initscripts/default.rcS /etc/default/rcS
-fi
-
-#
-# 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 "$PREV_VER" lt "2.86.ds1-7"
-then
- update-rc.d -f single remove >/dev/null 2>&1 || :
-fi
-
-# In 2.86.ds1-16, the mtab.sh and hostname.sh scripts were moved.
-if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-16"
-then
- update-rc.d -f mtab.sh remove >/dev/null 2>&1 || :
- update-rc.d -f hostname.sh remove >/dev/null 2>&1 || :
-fi
-
-# In 2.86.ds1-21, the sendsigs script were moved, and in 2.86.ds1-35
-# it was moved back.
-if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-35"
-then
- update-rc.d -f sendsigs remove >/dev/null 2>&1 || :
-fi
-
-#
-# In 2.87dsf-2 the "mountoverflowtmp" script was dropped
-# from runlevels 0 and 6.
-# We have to remove the old links _before_ we install new ones.
-#
-if dpkg --compare-versions "$PREV_VER" lt "2.87dsf-2" ; then
- update-rc.d -f mountoverflowtmp remove >/dev/null 2>&1 || :
-fi
-
-#
-# Okay, we could do this with update-rc.d, but that would probably
-# be pretty slow. This way we win some speed.
-# DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES.
-#
-# Links in runlevel S
-#
-updatercd mountkernfs.sh start 2 S .
-updatercd hostname.sh start 2 S .
-updatercd mountdevsubfs.sh start 4 S .
-updatercd bootlogd start 5 S .
-updatercd checkroot.sh start 10 S .
-updatercd mtab.sh start 12 S .
-updatercd checkfs.sh start 30 S .
-updatercd mountall.sh start 35 S .
-updatercd mountall-bootclean.sh start 36 S .
-updatercd mountoverflowtmp start 37 S .
-updatercd mountnfs.sh start 45 S .
-updatercd mountnfs-bootclean.sh start 46 S .
-updatercd bootmisc.sh start 55 S .
-updatercd urandom start 55 S . start 30 0 6 .
-#
-# Links in runlevels other than S
-#
-updatercd halt start 90 0 .
-updatercd reboot start 90 6 .
-updatercd umountroot start 60 0 6 .
-updatercd umountfs start 40 0 6 .
-updatercd umountnfs.sh start 31 0 6 .
-updatercd sendsigs start 20 0 6 .
-
-updatercd killprocs start 30 1 .
-updatercd single start 90 1 .
-updatercd bootlogs start 70 1 2 3 4 5 .
-updatercd rc.local start 99 2 3 4 5 .
-updatercd rmnologin start 99 2 3 4 5 .
-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 mount{kern,devsub}fs.sh
-#
-#
-# In 2.86.ds1-10 the "mountvirtfs" script was replaced by
-# mountkernfs.sh and mountdevsubfs.sh. It was removed completely in
-# 2.86.ds1-16.
-#
-for F in mountkernfs devpts.sh mountvirtfs
-do
- rm -f /etc/init.d/$F
- update-rc.d $F remove >/dev/null 2>&1 || :
-done
-
-#
-# Create /var/run and /var/lock on the root partition to make sure
-# they are available when RAMRUN or RAMLOCK is enabled.
-# If mount fail (like in a vserver environment), just clean up and ignore
-# it. The admins enabling RAMRUN and RAMLOCK will have to create the
-# directories themselves in this case.
-#
-if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-22" && ! chrooted
-then
- # We need to quickly bind / to another location so we can make them
- # just in case /var is a mountpoint or a symlink to one.
- mkdir -p /.root
- if mount -n --bind / /.root ; then
- if [ -L /.root/var ] && [ ! -d /.root/var ] ; then
- # No use trying if /var is a relative symlink. It is not
- # going to work.
- :
- else
- mkdir -p /.root/var/run /.root/var/lock
- fi
- umount /.root
- fi
- rmdir /.root
-fi
-
-#
-# When installing for the first time or upgrading from version before 2.86.ds1-27,
-# a reboot is needed to make the /lib/init/rw/ tmpfs available. Flag this
-# using notify-reboot-required. Not mounting it here as it creates problem
-# for debootstrap, vservers, pbuilder and cowbuilder.
-#
-if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-27" \
- && [ -x /usr/share/update-notifier/notify-reboot-required ]; then
- /usr/share/update-notifier/notify-reboot-required
-fi
-
-#
-# Create initial log files
-#
-[ "$PREV_VER" ] || chmod 755 /var/log/fsck || :
-for F in /var/log/dmesg /var/log/boot /var/log/fsck/checkroot /var/log/fsck/checkfs
-do
- if [ ! -f "$F" ] && touch "$F" >/dev/null 2>&1
- then
- 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
-# (when DELAYLOGIN is set to "yes")
-#
-if [ ! -L /etc/nologin ] && [ ! -e /etc/nologin ]
-then
- rm -f /var/lib/initscripts/nologin
- ln -s /var/lib/initscripts/nologin /etc/nologin
-fi
-
-#
-# Set up motd stuff, putting variable file in /var/run/
-#
-if [ ! -f /etc/motd.tail ]
-then
- if [ -f /etc/motd ]
- then
- sed 1d /etc/motd > /etc/motd.tail
- [ -s /etc/motd.tail ] || rm -f /etc/motd.tail
- fi
-fi
-if [ ! -f /var/run/motd ]
-then
- if [ -f /etc/motd ]
- then
- cat /etc/motd > /var/run/motd
- else
- :>/var/run/motd
- fi
-fi
-if [ ! -L /etc/motd ]
-then
- [ -f /etc/default/rcS ] && . /etc/default/rcS
- if [ "$EDITMOTD" = no ]
- then
- cat /var/run/motd > /etc/motd.static
- ln -sf motd.static /etc/motd
- else
- ln -sf /var/run/motd /etc/motd
- fi
-fi
-
-#
-# Mount kernel virtual filesystems...not.
-# This causes problems in pbuilder.
-#
-#
-#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.
- # (it is OK for these to fail under fakechroot)
- #
- if ! mountpoint -q /dev
- then
- [ -d /dev/pts ] || { mkdir --mode=755 /dev/pts ; chown root:root /dev/pts || [ "$FAKECHROOT" = true ]; }
- [ -d /dev/shm ] || { mkdir --mode=755 /dev/shm ; chown root:root /dev/shm || [ "$FAKECHROOT" = true ]; }
- fi
-fi
-
-#
-# Create /etc/rc.local on first time install and when upgrading from
-# versions before "2.86.ds1-16"
-#
-if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-16"
-then
- if [ ! -e /etc/rc.local ]; then
- cat << EOF > /etc/rc.local
-#!/bin/sh -e
-#
-# rc.local
-#
-# This script is executed at the end of each multiuser runlevel.
-# Make sure that the script will "exit 0" on success or any other
-# value on error.
-#
-# In order to enable or disable this script just change the execution
-# bits.
-#
-# By default this script does nothing.
-
-exit 0
-EOF
- # make sure it's enabled by default.
- chmod 755 /etc/rc.local
- fi
-fi
-
-:
Deleted: sysvinit/trunk/debian/initscripts/postrm
===================================================================
--- sysvinit/trunk/debian/initscripts/postrm 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/initscripts/postrm 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,53 +0,0 @@
-#! /bin/sh
-#
-# initscripts postrm
-#
-
-set -e
-
-case "$1" in
- purge)
- #
- # Remove abandoned conffiles
- #
- rm -f \
- /etc/init.d/bootclean \
- /etc/init.d/bootclean.dpkg-old \
- /etc/init.d/bootclean.sh \
- /etc/init.d/bootclean.sh.dpkg-old
-
- #
- # Remove configuration files
- #
- rm -f \
- /etc/default/rcS \
- /etc/nologin \
- /etc/motd.tail \
- /etc/motd.static \
- /etc/motd
-
- #
- # Remove state files
- #
- rm -f /var/lib/initscripts/nologin
-
- #
- # Remove run time state files
- #
- rm -f /var/run/motd
-
- #
- # Remove log files
- #
- rm -f \
- /var/log/dmesg \
- /var/log/boot \
- /var/log/fsck/checkroot \
- /var/log/fsck/checkfs
-
- # Remove rc symlinks ?
- # Remove /dev/pts and /dev/shm ?
- ;;
-esac
-
-:
Deleted: sysvinit/trunk/debian/initscripts/preinst
===================================================================
--- sysvinit/trunk/debian/initscripts/preinst 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/initscripts/preinst 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,63 +0,0 @@
-#! /bin/sh
-#
-# initscripts preinst
-#
-
-set -e
-
-# Remove a no-longer used conffile
-#
-# $1: conffile
-#
-# If the argument was not listed as a conffile, silently do nothing.
-# Adapted from code obtained from http://wiki.debian.org/DpkgConffileHandling
-eliminate_conffile() {
- PKGNAME="initscripts"
- CONFFILE="$1"
-
- if [ -e "$CONFFILE" ]; then
- CURRENT_MD5SUM="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
- FACTORY_MD5SUM="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
- if [ "$CURRENT_MD5SUM" != "$FACTORY_MD5SUM" ]; then
- echo "Obsolete conffile $CONFFILE has been modified by you."
- echo "Saving as $CONFFILE.dpkg-old ..."
- mv -f "$CONFFILE" "$CONFFILE".dpkg-old
- else
- echo "Removing unmodified and obsolete conffile $CONFFILE ..."
- rm -f "$CONFFILE"
- fi
- fi
-}
-
-case "$1" in
- install|upgrade)
- #
- # /etc/init.d/stop-bootlogd used to be a symlink to bootlogd;
- # now it is a separate script. We need to remove the symlink here,
- # before dpkg installs the /etc/init.d/stop-bootlogd file.
- #
- [ -L /etc/init.d/stop-bootlogd ] && rm -f /etc/init.d/stop-bootlogd
- #
- # Remove obsolete conffiles
- #
- if [ "$2" ] && dpkg --compare-versions "$2" lt "2.86.ds1-10" ; then
- eliminate_conffile "/etc/init.d/bootclean.sh"
- fi
- #
- # The /etc/init.d/bootclean script fragment was moved to
- # /lib/init/ in version 2.86.ds1-39
- #
- if [ "$2" ] && dpkg --compare-versions "$2" lt "2.86.ds1-54" ; then
- eliminate_conffile "/etc/init.d/bootclean"
- 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
-
-:
Copied: sysvinit/trunk/debian/initscripts.copyright (from rev 1548, sysvinit/trunk/debian/initscripts/copyright)
===================================================================
--- sysvinit/trunk/debian/initscripts.copyright (rev 0)
+++ sysvinit/trunk/debian/initscripts.copyright 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,31 @@
+This package contains the scripts that are executed at start and
+shutdown of Debian systems.
+
+This package is built from the `sysvinit' source package. Please
+consult the copyright file of the sysvinit package for the location of
+the upstream sources of the sysvinit package. Debian-specific files
+for sysvinit, such as these initscripts, are maintained by the members
+of the pkg-sysvinit project at alioth.debian.org.
+
+ http://alioth.debian.org/projects/pkg-sysvinit
+
+Copyright 1997-2005 Miquel van Smoorenburg <miquels at cistron.nl> and
+the members pkg-sysvinit project.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
Copied: sysvinit/trunk/debian/initscripts.postinst (from rev 1548, sysvinit/trunk/debian/initscripts/postinst)
===================================================================
--- sysvinit/trunk/debian/initscripts.postinst (rev 0)
+++ sysvinit/trunk/debian/initscripts.postinst 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,327 @@
+#! /bin/sh
+#
+# initscripts postinst
+#
+
+set -e
+
+case "$1" in
+ configure)
+ PREV_VER=$2
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0
+ ;;
+esac
+
+umask 022
+
+#
+# Function like update-rc.d but simpler & faster.
+# Usage: updatercd basename start|stop NN runlevel .
+#
+# Heuristic: use the real update-rc.d if file-rc or insserv is
+# detected, or if the /etc/rc2.d directory is not present.
+#
+updatercd() {
+
+ [ -f /etc/init.d/$1 ] || return 0
+
+ if \
+ [ -d /usr/share/file-rc/. ] \
+ || [ -d /usr/lib/file-rc/. ] \
+ || [ -d /usr/share/insserv/. ] \
+ || [ ! -d /etc/rc2.d/. ]
+ then
+ # Funniness on next line is because we are running with set -e
+ update-rc.d "$@" >/dev/null && return 0 || return $?
+ fi
+
+ base=$1
+ shift
+
+ tmp="$(echo /etc/rc?.d/[SK]??$base)"
+ case "$tmp" in
+ "/etc/rc?.d/[SK]??$base") : ;;
+ *) return ;;
+ esac
+
+ while [ "$1" != "" ]
+ do
+ if [ "$1" = stop ]
+ then
+ tlet=K
+ else
+ tlet=S
+ fi
+ case "$2" in
+ ?) lev=0$2 ;;
+ *) lev=$2 ;;
+ esac
+ shift 2
+ while [ "$1" != "." ]
+ do
+ cd /etc/rc$1.d
+ ln -sf ../init.d/$base $tlet$lev$base
+ shift
+ done
+ shift
+ done
+}
+
+chrooted() {
+ if [ -r /proc/1/root ]; then
+ return 1
+ fi
+ return 0
+}
+
+#
+# Initialize rcS default file.
+#
+if [ ! -f /etc/default/rcS ]
+then
+ cp -p /usr/share/initscripts/default.rcS /etc/default/rcS
+fi
+
+#
+# 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 "$PREV_VER" lt "2.86.ds1-7"
+then
+ update-rc.d -f single remove >/dev/null 2>&1 || :
+fi
+
+# In 2.86.ds1-16, the mtab.sh and hostname.sh scripts were moved.
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-16"
+then
+ update-rc.d -f mtab.sh remove >/dev/null 2>&1 || :
+ update-rc.d -f hostname.sh remove >/dev/null 2>&1 || :
+fi
+
+# In 2.86.ds1-21, the sendsigs script were moved, and in 2.86.ds1-35
+# it was moved back.
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-35"
+then
+ update-rc.d -f sendsigs remove >/dev/null 2>&1 || :
+fi
+
+#
+# In 2.87dsf-2 the "mountoverflowtmp" script was dropped
+# from runlevels 0 and 6.
+# We have to remove the old links _before_ we install new ones.
+#
+if dpkg --compare-versions "$PREV_VER" lt "2.87dsf-2" ; then
+ update-rc.d -f mountoverflowtmp remove >/dev/null 2>&1 || :
+fi
+
+#
+# Okay, we could do this with update-rc.d, but that would probably
+# be pretty slow. This way we win some speed.
+# DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES.
+#
+# Links in runlevel S
+#
+updatercd mountkernfs.sh start 2 S .
+updatercd hostname.sh start 2 S .
+updatercd mountdevsubfs.sh start 4 S .
+updatercd bootlogd start 5 S .
+updatercd checkroot.sh start 10 S .
+updatercd mtab.sh start 12 S .
+updatercd checkfs.sh start 30 S .
+updatercd mountall.sh start 35 S .
+updatercd mountall-bootclean.sh start 36 S .
+updatercd mountoverflowtmp start 37 S .
+updatercd mountnfs.sh start 45 S .
+updatercd mountnfs-bootclean.sh start 46 S .
+updatercd bootmisc.sh start 55 S .
+updatercd urandom start 55 S . start 30 0 6 .
+#
+# Links in runlevels other than S
+#
+updatercd halt start 90 0 .
+updatercd reboot start 90 6 .
+updatercd umountroot start 60 0 6 .
+updatercd umountfs start 40 0 6 .
+updatercd umountnfs.sh start 31 0 6 .
+updatercd sendsigs start 20 0 6 .
+
+updatercd killprocs start 30 1 .
+updatercd single start 90 1 .
+updatercd bootlogs start 70 1 2 3 4 5 .
+updatercd rc.local start 99 2 3 4 5 .
+updatercd rmnologin start 99 2 3 4 5 .
+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 mount{kern,devsub}fs.sh
+#
+#
+# In 2.86.ds1-10 the "mountvirtfs" script was replaced by
+# mountkernfs.sh and mountdevsubfs.sh. It was removed completely in
+# 2.86.ds1-16.
+#
+for F in mountkernfs devpts.sh mountvirtfs
+do
+ rm -f /etc/init.d/$F
+ update-rc.d $F remove >/dev/null 2>&1 || :
+done
+
+#
+# Create /var/run and /var/lock on the root partition to make sure
+# they are available when RAMRUN or RAMLOCK is enabled.
+# If mount fail (like in a vserver environment), just clean up and ignore
+# it. The admins enabling RAMRUN and RAMLOCK will have to create the
+# directories themselves in this case.
+#
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-22" && ! chrooted
+then
+ # We need to quickly bind / to another location so we can make them
+ # just in case /var is a mountpoint or a symlink to one.
+ mkdir -p /.root
+ if mount -n --bind / /.root ; then
+ if [ -L /.root/var ] && [ ! -d /.root/var ] ; then
+ # No use trying if /var is a relative symlink. It is not
+ # going to work.
+ :
+ else
+ mkdir -p /.root/var/run /.root/var/lock
+ fi
+ umount /.root
+ fi
+ rmdir /.root
+fi
+
+#
+# When installing for the first time or upgrading from version before 2.86.ds1-27,
+# a reboot is needed to make the /lib/init/rw/ tmpfs available. Flag this
+# using notify-reboot-required. Not mounting it here as it creates problem
+# for debootstrap, vservers, pbuilder and cowbuilder.
+#
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-27" \
+ && [ -x /usr/share/update-notifier/notify-reboot-required ]; then
+ /usr/share/update-notifier/notify-reboot-required
+fi
+
+#
+# Create initial log files
+#
+[ "$PREV_VER" ] || chmod 755 /var/log/fsck || :
+for F in /var/log/dmesg /var/log/boot /var/log/fsck/checkroot /var/log/fsck/checkfs
+do
+ if [ ! -f "$F" ] && touch "$F" >/dev/null 2>&1
+ then
+ 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
+# (when DELAYLOGIN is set to "yes")
+#
+if [ ! -L /etc/nologin ] && [ ! -e /etc/nologin ]
+then
+ rm -f /var/lib/initscripts/nologin
+ ln -s /var/lib/initscripts/nologin /etc/nologin
+fi
+
+#
+# Set up motd stuff, putting variable file in /var/run/
+#
+if [ ! -f /etc/motd.tail ]
+then
+ if [ -f /etc/motd ]
+ then
+ sed 1d /etc/motd > /etc/motd.tail
+ [ -s /etc/motd.tail ] || rm -f /etc/motd.tail
+ fi
+fi
+if [ ! -f /var/run/motd ]
+then
+ if [ -f /etc/motd ]
+ then
+ cat /etc/motd > /var/run/motd
+ else
+ :>/var/run/motd
+ fi
+fi
+if [ ! -L /etc/motd ]
+then
+ [ -f /etc/default/rcS ] && . /etc/default/rcS
+ if [ "$EDITMOTD" = no ]
+ then
+ cat /var/run/motd > /etc/motd.static
+ ln -sf motd.static /etc/motd
+ else
+ ln -sf /var/run/motd /etc/motd
+ fi
+fi
+
+#
+# Mount kernel virtual filesystems...not.
+# This causes problems in pbuilder.
+#
+#
+#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.
+ # (it is OK for these to fail under fakechroot)
+ #
+ if ! mountpoint -q /dev
+ then
+ [ -d /dev/pts ] || { mkdir --mode=755 /dev/pts ; chown root:root /dev/pts || [ "$FAKECHROOT" = true ]; }
+ [ -d /dev/shm ] || { mkdir --mode=755 /dev/shm ; chown root:root /dev/shm || [ "$FAKECHROOT" = true ]; }
+ fi
+fi
+
+#
+# Create /etc/rc.local on first time install and when upgrading from
+# versions before "2.86.ds1-16"
+#
+if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-16"
+then
+ if [ ! -e /etc/rc.local ]; then
+ cat << EOF > /etc/rc.local
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+exit 0
+EOF
+ # make sure it's enabled by default.
+ chmod 755 /etc/rc.local
+ fi
+fi
+
+:
Copied: sysvinit/trunk/debian/initscripts.postrm (from rev 1548, sysvinit/trunk/debian/initscripts/postrm)
===================================================================
--- sysvinit/trunk/debian/initscripts.postrm (rev 0)
+++ sysvinit/trunk/debian/initscripts.postrm 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,53 @@
+#! /bin/sh
+#
+# initscripts postrm
+#
+
+set -e
+
+case "$1" in
+ purge)
+ #
+ # Remove abandoned conffiles
+ #
+ rm -f \
+ /etc/init.d/bootclean \
+ /etc/init.d/bootclean.dpkg-old \
+ /etc/init.d/bootclean.sh \
+ /etc/init.d/bootclean.sh.dpkg-old
+
+ #
+ # Remove configuration files
+ #
+ rm -f \
+ /etc/default/rcS \
+ /etc/nologin \
+ /etc/motd.tail \
+ /etc/motd.static \
+ /etc/motd
+
+ #
+ # Remove state files
+ #
+ rm -f /var/lib/initscripts/nologin
+
+ #
+ # Remove run time state files
+ #
+ rm -f /var/run/motd
+
+ #
+ # Remove log files
+ #
+ rm -f \
+ /var/log/dmesg \
+ /var/log/boot \
+ /var/log/fsck/checkroot \
+ /var/log/fsck/checkfs
+
+ # Remove rc symlinks ?
+ # Remove /dev/pts and /dev/shm ?
+ ;;
+esac
+
+:
Copied: sysvinit/trunk/debian/initscripts.preinst (from rev 1548, sysvinit/trunk/debian/initscripts/preinst)
===================================================================
--- sysvinit/trunk/debian/initscripts.preinst (rev 0)
+++ sysvinit/trunk/debian/initscripts.preinst 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,63 @@
+#! /bin/sh
+#
+# initscripts preinst
+#
+
+set -e
+
+# Remove a no-longer used conffile
+#
+# $1: conffile
+#
+# If the argument was not listed as a conffile, silently do nothing.
+# Adapted from code obtained from http://wiki.debian.org/DpkgConffileHandling
+eliminate_conffile() {
+ PKGNAME="initscripts"
+ CONFFILE="$1"
+
+ if [ -e "$CONFFILE" ]; then
+ CURRENT_MD5SUM="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+ FACTORY_MD5SUM="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
+ if [ "$CURRENT_MD5SUM" != "$FACTORY_MD5SUM" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-old ..."
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-old
+ else
+ echo "Removing unmodified and obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+ fi
+}
+
+case "$1" in
+ install|upgrade)
+ #
+ # /etc/init.d/stop-bootlogd used to be a symlink to bootlogd;
+ # now it is a separate script. We need to remove the symlink here,
+ # before dpkg installs the /etc/init.d/stop-bootlogd file.
+ #
+ [ -L /etc/init.d/stop-bootlogd ] && rm -f /etc/init.d/stop-bootlogd
+ #
+ # Remove obsolete conffiles
+ #
+ if [ "$2" ] && dpkg --compare-versions "$2" lt "2.86.ds1-10" ; then
+ eliminate_conffile "/etc/init.d/bootclean.sh"
+ fi
+ #
+ # The /etc/init.d/bootclean script fragment was moved to
+ # /lib/init/ in version 2.86.ds1-39
+ #
+ if [ "$2" ] && dpkg --compare-versions "$2" lt "2.86.ds1-54" ; then
+ eliminate_conffile "/etc/init.d/bootclean"
+ 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
+
+:
Modified: sysvinit/trunk/debian/rules
===================================================================
--- sysvinit/trunk/debian/rules 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/rules 2009-07-26 11:08:54 UTC (rev 1551)
@@ -246,11 +246,11 @@
install -o root -g root -m 644 \
debian/initscripts/lintian.overrides \
$(tmp)/usr/share/lintian/overrides/initscripts
- install -o root -g root -m 644 debian/initscripts/copyright \
+ install -o root -g root -m 644 debian/initscripts.copyright \
$(tmp)$(doc)/initscripts/copyright
- install -o root -g root -m 755 debian/initscripts/preinst $(tmp)/DEBIAN
- install -o root -g root -m 755 debian/initscripts/postinst $(tmp)/DEBIAN
- install -o root -g root -m 755 debian/initscripts/postrm $(tmp)/DEBIAN
+ install -o root -g root -m 755 debian/initscripts.preinst $(tmp)/DEBIAN/preinst
+ install -o root -g root -m 755 debian/initscripts.postinst $(tmp)/DEBIAN/postinst
+ install -o root -g root -m 755 debian/initscripts.postrm $(tmp)/DEBIAN/postrm
install -o root -g root -m 644 debian/initscripts/conffiles \
$(tmp)/DEBIAN/conffiles
dpkg-shlibdeps debian/readlink
@@ -309,9 +309,9 @@
install -o root -g root -m 644 \
debian/sysv-rc/lintian.overrides \
$(tmp)/usr/share/lintian/overrides/sysv-rc
- install -o root -g root -m 644 debian/sysv-rc/copyright \
+ install -o root -g root -m 644 debian/sysv-rc.copyright \
$(tmp)$(doc)/sysv-rc/copyright
- install -o root -g root -m 755 debian/sysv-rc/postrm $(tmp)/DEBIAN/postrm
+ install -o root -g root -m 755 debian/sysv-rc.postrm $(tmp)/DEBIAN/postrm
dpkg-gencontrol -psysv-rc -P$(tmp) -isp
dh_md5sums
dpkg --build $(tmp) ..
Deleted: sysvinit/trunk/debian/sysv-rc/copyright
===================================================================
--- sysvinit/trunk/debian/sysv-rc/copyright 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/sysv-rc/copyright 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,32 +0,0 @@
-This package contains the mechanism for executing the right scripts
-in the right order at bootup/shutdown time, and when changing runlevels.
-It works through managing symlinks in /etc/rc?.d
-
-This package is built from the `sysvinit' source package. Please
-consult the copyright file of the sysvinit package for the location of
-the upstream sources of the sysvinit package. Debian-specific files
-for sysvinit, such as these initscripts, are maintained by the members
-of the pkg-sysvinit project at alioth.debian.org.
-
- http://alioth.debian.org/projects/pkg-sysvinit
-
-Copyright 1997-2005 Miquel van Smoorenburg <miquels at cistron.nl> and
-the members pkg-sysvinit project.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA
-
-On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL-2'.
Deleted: sysvinit/trunk/debian/sysv-rc/postrm
===================================================================
--- sysvinit/trunk/debian/sysv-rc/postrm 2009-07-26 10:24:22 UTC (rev 1550)
+++ sysvinit/trunk/debian/sysv-rc/postrm 2009-07-26 11:08:54 UTC (rev 1551)
@@ -1,18 +0,0 @@
-#! /bin/sh
-#
-# sysv-rc postrm
-#
-
-set -e
-
-case "$1" in
- remove) : ;;
- *) exit 0 ;;
-esac
-
-umask 022
-
-ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/update-rc.d
-ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/invoke-rc.d
-
-exit 0
Copied: sysvinit/trunk/debian/sysv-rc.copyright (from rev 1548, sysvinit/trunk/debian/sysv-rc/copyright)
===================================================================
--- sysvinit/trunk/debian/sysv-rc.copyright (rev 0)
+++ sysvinit/trunk/debian/sysv-rc.copyright 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,32 @@
+This package contains the mechanism for executing the right scripts
+in the right order at bootup/shutdown time, and when changing runlevels.
+It works through managing symlinks in /etc/rc?.d
+
+This package is built from the `sysvinit' source package. Please
+consult the copyright file of the sysvinit package for the location of
+the upstream sources of the sysvinit package. Debian-specific files
+for sysvinit, such as these initscripts, are maintained by the members
+of the pkg-sysvinit project at alioth.debian.org.
+
+ http://alioth.debian.org/projects/pkg-sysvinit
+
+Copyright 1997-2005 Miquel van Smoorenburg <miquels at cistron.nl> and
+the members pkg-sysvinit project.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
Copied: sysvinit/trunk/debian/sysv-rc.postrm (from rev 1548, sysvinit/trunk/debian/sysv-rc/postrm)
===================================================================
--- sysvinit/trunk/debian/sysv-rc.postrm (rev 0)
+++ sysvinit/trunk/debian/sysv-rc.postrm 2009-07-26 11:08:54 UTC (rev 1551)
@@ -0,0 +1,18 @@
+#! /bin/sh
+#
+# sysv-rc postrm
+#
+
+set -e
+
+case "$1" in
+ remove) : ;;
+ *) exit 0 ;;
+esac
+
+umask 022
+
+ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/update-rc.d
+ln -sf /usr/share/sysvinit/update-rc.d /usr/sbin/invoke-rc.d
+
+exit 0
More information about the Pkg-sysvinit-commits
mailing list