Commit fd39bf2f authored by Dmitry Bogatov's avatar Dmitry Bogatov

Merge branch 'release/2.94-3'

* release/2.94-3:
  Drop special cases for updates from ancient versions (Closes: #922421)
  Add new parameter COMMAND_NAME to init-d-script
  Remove unused lintian overrides
  Remove check for .legacy-bootordering flag file
  Correctly quote arguments to grep in umountfs script (Closes: #575204)
parents 12a52ec6 7df379aa
......@@ -7,4 +7,3 @@ bootlogd: init.d-script-missing-dependency-on-remote_fs etc/init.d/bootlogd: req
bootlogd: script-in-etc-init.d-not-registered-via-update-rc.d
bootlogd: init.d-script-missing-dependency-on-local_fs
bootlogd: init.d-script-depends-on-all-virtual-facility
sysvinit (2.94-3) experimental; urgency=medium
* Correctly quote arguments to grep in umountfs script (Closes: #575204)
* Add new parameter COMMAND_NAME to init-d-script (Closes: #834419)
* Drop special cases for updates from ancient versions (Closes: #922421)
* Remove check for .legacy-bootordering flag file (Closes: #926854)
* Remove unused lintian overrides (Closes: #926855)
-- Dmitry Bogatov <KAction@debian.org> Sun, 14 Apr 2019 13:40:55 +0000
sysvinit (2.94-2) experimental; urgency=medium
* Make init-d-scripts exit with sensible values (Closes: #427889)
......
......@@ -46,7 +46,7 @@ call() {
do_start_cmd() {
start-stop-daemon --start --quiet --oknodo \
${PIDFILE:+--pidfile ${PIDFILE}} $START_ARGS \
--startas $DAEMON --name $NAME --exec $DAEMON -- $DAEMON_ARGS
--startas $DAEMON --name ${COMMAND_NAME} --exec $DAEMON -- $DAEMON_ARGS
}
do_start()
......@@ -75,7 +75,7 @@ do_start()
do_stop_cmd() {
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
$STOP_ARGS \
${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON
${PIDFILE:+--pidfile ${PIDFILE}} --name ${COMMAND_NAME} --exec $DAEMON
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
......@@ -174,6 +174,7 @@ fi
NAME=${NAME:=$(basename $DAEMON)}
DESC=${DESC:=$NAME}
: ${COMMAND_NAME:=${NAME}}
# Do not use pid file if $PIDFILE is 'none'. Otherwise, generate from
# $NAME or use the value provided by the init.d script.
......
......@@ -44,13 +44,20 @@ DAEMON=/usr/sbin/atd
.EE
.P
In addition to the DAEMON setting, one can specify DESC, NAME,
PIDFILE (`none' means no PID file), or implement override functions
do_force_reload_override, do_reload_override, do_restart_override,
do_start_override, do_start_cmd_override, do_start_prepare,
do_start_cleanup do_status_override, do_stop_override,
COMMAND_NAME, PIDFILE (`none' means no PID file), or implement
override functions do_force_reload_override, do_reload_override,
do_restart_override, do_start_override, do_start_cmd_override,
do_start_prepare, do_start_cleanup do_status_override, do_stop_override,
do_stop_prepare, do_stop_cleanup and do_stop_cmd_override.
.P
If the daemon support reloading, implement the do_reload function to
The argument of the
.I --name
option of the
.B start-stop-daemon
program is the value of the COMMAND_NAME variable if set, or otherwise
the value of the NAME variable.
.P
If the daemon supports reloading, implement the do_reload function to
make the init.d script recognize the reload operation as well as use
it for the force-reload operation.
.P
......
......@@ -24,8 +24,3 @@ initscripts: script-in-etc-init.d-not-registered-via-update-rc.d
initscripts: init.d-script-missing-dependency-on-local_fs
initscripts: init.d-script-depends-on-all-virtual-facility
# Init scripts, provided by bin:initscripts are explicitly whitelisted
# in `data/systemd/init-whitelist' by Lintian. The `brightness' script
# is very new, and not yet in that whitelist.
initscripts: missing-systemd-service-for-init.d-rcS-script brightness
......@@ -24,27 +24,6 @@ fi
umask 022
# In 2.88dsf-23 the "mountoverflowtmp" script was dropped entirely.
if dpkg --compare-versions "$PREV_VER" lt-nl "2.88dsf-23" ; then
update-rc.d -f mountoverflowtmp remove >/dev/null
fi
# In 2.88dsf-41+jessie1 the "mtab.sh" script was dropped entirely.
if dpkg --compare-versions "$PREV_VER" lt-nl "2.88dsf-41+jessie1" ; then
update-rc.d -f mtab.sh remove >/dev/null
fi
# Comment out obsolete options in rcS.
if dpkg --compare-versions "$PREV_VER" lt-nl "2.88dsf-23" ; then
if [ -f /etc/default/rcS ]; then
sed -i \
-e 's:^\(RAMRUN=.*\)$:#\1 # OBSOLETE; see /etc/default/tmpfs and tmpfs(5).:' \
-e 's:^\(RAMLOCK=.*\)$:#\1 # OBSOLETE; see /etc/default/tmpfs and tmpfs(5).:' \
-e ':^RAMSHM=:i# OBSOLETE; see /etc/default/tmpfs and tmpfs(5).' \
-e ':^RAMTMP=:i# OBSOLETE; see /etc/default/tmpfs and tmpfs(5).' \
-e 's:^\(EDITMOTD=.*\)$:#\1 # OBSOLETE.:' /etc/default/rcS
fi
fi
INITSCRIPTS="mountkernfs.sh brightness hostname.sh mountdevsubfs.sh checkroot.sh \
checkroot-bootclean.sh checkfs.sh mountall.sh mountall-bootclean.sh \
mountnfs.sh mountnfs-bootclean.sh bootmisc.sh urandom halt reboot \
......@@ -80,18 +59,6 @@ do
update-rc.d $F remove >/dev/null
done
#
# When installing for the first time or upgrading from a version
# before or equal to 2.88dsf-14, a reboot is needed to make the /run
# tmpfs available. Flag this using notify-reboot-required. /run is
# available in some form before the reboot, so the need for a reboot
# isn't particularly urgent.
#
if dpkg --compare-versions "$PREV_VER" le "2.88dsf-13.3" \
&& [ -x /usr/share/update-notifier/notify-reboot-required ]; then
/usr/share/update-notifier/notify-reboot-required
fi
#
# Create initial log files
#
......@@ -166,36 +133,4 @@ if [ "$PREV_VER" = "" ]; then
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.
[ -d /etc/boot.d ] && run-parts /etc/boot.d
exit 0
EOF
# make sure it's enabled by default.
chmod 755 /etc/rc.local
fi
fi
#DEBHELPER#
:
#! /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)
# mtab was removed in 2.88dsf-41+jessie1; the remaining two lines
# were merged into checkroot, which provides mtab for compatibility
if [ "$2" ] && dpkg --compare-versions "$2" lt "2.88dsf-41+jessie1" ; then
eliminate_conffile "/etc/init.d/mtab.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
#DEBHELPER#
case $1 in
(install|upgrade)
if dpkg --compare-versions "$2" lt '2.94-2' ; then
......@@ -58,3 +10,5 @@ case $1 in
fi
;;
esac
#DEBHELPER#
sysvinit source: debian-watch-file-should-mangle-version
......@@ -23,7 +23,7 @@ do_stop () {
TMPFS_MTPTS=""
while read -r DEV MTPT FSTYPE REST
do
echo "$PROTECTED_MOUNTS" | grep -qs "^$DEV $MTPT " && continue
echo "$PROTECTED_MOUNTS" | grep -qsF "$DEV $MTPT " && continue
case "$MTPT" in
/|/usr|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/lock|/run/shm|/run/rpc_pipefs|/dev/vcs)
continue
......
......@@ -73,9 +73,6 @@ CONCURRENCY=makefile
test -s /etc/init.d/.depend.boot || CONCURRENCY="none"
test -s /etc/init.d/.depend.start || CONCURRENCY="none"
test -s /etc/init.d/.depend.stop || CONCURRENCY="none"
if test -e /etc/init.d/.legacy-bootordering ; then
CONCURRENCY="none"
fi
if grep -wqs concurrency=none /proc/cmdline; then
CONCURRENCY="none"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment