[Pkg-sysvinit-devel] What should we do about sysvinit in unstable?
Petter Reinholdtsen
pere at hungry.com
Sat Oct 25 21:55:29 UTC 2014
Hi.
I added the latests NMUs to git and uploaded the current set of
changes to experimental after confirming that it could boot at least
one machine. When I started uploading to experimental in April, I
expected to have time to get the changes tested and ready for unstable
fairly soon, and get all the changes into unstable before Jessie
froze. That obviously did not happen, and I now wonder how we should
move forward.
The package in unstable (2.88dsf-53.4) is the last of a series of
NMUs, and similar NMUs were done in experimental. The package in
experimental (2.88dsf-56) now contain the changes from all the NMUs
done so far, after my upload today. But I suspect we should not
upload the experimental package to unstable this late in the release
cycle. There are not many changes, but I suspect the release managers
might be a bit reluctant to accept these changes.
These are the changes to the git source compared to the latest NMU in
unstable.
.git |only
debian/changelog | 111 +++++++++++++++
debian/control | 9 -
debian/initscripts.postinst | 6
debian/service/service | 23 +--
debian/service/service.8 | 2
debian/src/initscripts/etc/hurd/runsystem.sysv | 10 +
debian/src/initscripts/etc/init.d/bootmisc.sh | 2
debian/src/initscripts/etc/init.d/checkfs.sh | 4
debian/src/initscripts/etc/init.d/checkroot-bootclean.sh | 2
debian/src/initscripts/etc/init.d/checkroot.sh | 2
debian/src/initscripts/etc/init.d/halt | 2
debian/src/initscripts/etc/init.d/killprocs | 2
debian/src/initscripts/etc/init.d/mountall-bootclean.sh | 2
debian/src/initscripts/etc/init.d/mountall.sh | 2
debian/src/initscripts/etc/init.d/mountdevsubfs.sh | 2
debian/src/initscripts/etc/init.d/mountkernfs.sh | 2
debian/src/initscripts/etc/init.d/mountnfs-bootclean.sh | 2
debian/src/initscripts/etc/init.d/mountnfs.sh | 5
debian/src/initscripts/etc/init.d/rc.local | 4
debian/src/initscripts/etc/init.d/reboot | 3
debian/src/initscripts/etc/init.d/sendsigs | 2
debian/src/initscripts/etc/init.d/single | 2
debian/src/initscripts/etc/init.d/umountfs | 2
debian/src/initscripts/etc/init.d/umountnfs.sh | 2
debian/src/initscripts/etc/init.d/umountroot | 2
debian/src/sysv-rc/sbin/invoke-rc.d | 5
debian/src/sysv-rc/sbin/update-rc.d | 11 -
debian/sysvinit-core.config | 9 -
debian/sysvinit-core.postinst | 28 ++-
debian/sysvinit-core.templates | 16 +-
31 files changed, 210 insertions(+), 66 deletions(-)
diff -ur ../test/sysvinit-2.88dsf/debian/changelog ./debian/changelog
--- ../test/sysvinit-2.88dsf/debian/changelog 2014-08-24 22:23:42.000000000 +0200
+++ ./debian/changelog 2014-10-25 23:34:29.435664190 +0200
@@ -1,3 +1,114 @@
+sysvinit (2.88dsf-56) experimental; urgency=medium
+
+ [ Dimitri John Ledkov ]
+ * service & invoke-rc.d: in upstart interfacing code, check that the job
+ is actually known to upstart. This is because during upgrades, pid 1
+ might still be an older upstart which may not yet support syntax of
+ the newly unpacked jobs, thus sysv-init script should be continued to
+ be used instead. (Closes: #745503)
+ * service & invoke-rc.d: unset UPSTART_SESSION environment variable to
+ make sure all upstart initctl commands are executed against system
+ init and not the session one. (Closes: #745505)
+ * service: in upstart interfacing code, map "force-reload" to restart as
+ per Debian policy 9.3.2, since there is no way to know for-sure if a
+ reload is supported.
+
+ [ Petter Reinholdtsen ]
+ * Adjust the sysvinit/hurd-fix-inittab debconf template to no longer
+ claim sysvinit have never been used on hurd. It is not true any
+ more.
+
+ [ Steve Langasek ]
+ * Add necessary Conflicts/Replaces against systemd-sysv and upstart to
+ sysvinit-core. Closes: #751589.
+ * Confirm SRU fixing circular dependency of mountnfs ifupdown hook when
+ running with systemd. Closes: #746587.
+
+ [ Petter Reinholdtsen ]
+ * Update Vcs links in control file to the correct paths.
+ * Correct code in update-rc.d looking for insserv to look in
+ /usr/lib/insserv/insserv every time insserv is used, not only
+ only one of the relevant code blocks.
+
+ -- Petter Reinholdtsen <pere at debian.org> Sat, 25 Oct 2014 23:33:38 +0200
+
+sysvinit (2.88dsf-55.3) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * Since the new "init" metapackage has taken over the role to ensure an init
+ system is installed at all times, drop the Essential: yes flag from
+ sysvinit and demote its priority to optional so this package is no longer
+ pulled in on new installations on Linux. Make sysvinit depend on "init" so
+ this new package is installed on upgrades.
+ * Provide a fallback SysV init binary in the sysvinit package which can be
+ used to boot the system via init=/lib/sysvinit/init even if systemd is the
+ default init system and /sbin/init is provided by systemd-sysv.
+ * Demote the priority of sysvinit-core to extra so it is no longer installed
+ by default on Linux.
+
+ -- Michael Biebl <biebl at debian.org> Sun, 03 Aug 2014 21:06:44 +0200
+
+sysvinit (2.88dsf-55.2) experimental; urgency=medium
+
+ * Fix a formatting error in mountnfs which turned a tab character into
+ U+21A6.
+
+ -- Michael Biebl <biebl at debian.org> Sun, 08 Jun 2014 01:22:37 +0200
+
+sysvinit (2.88dsf-55.1) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * Skip the mountnfs hook when being triggered by the networking SysV init
+ script and instead use the systemd built-in mechanisms to mount remote
+ file systems.
+ This avoids a deadlock caused by the rpcbind SysV init script depending
+ on $network and the $network LSB facility being provided by the networking
+ SysV init script. (Closes: #746587)
+
+ -- Michael Biebl <biebl at debian.org> Fri, 06 Jun 2014 12:59:06 +0200
+
+sysvinit (2.88dsf-55) experimental; urgency=medium
+
+ [ Gabriele Giacone ]
+ * sysv-rc:
+ - On hurd, fix hurd-console addition to inittab if inittab is already
+ existent and fix getty pathnames in commented out lines as well
+ (Closes: #745260).
+
+ [ Petter Reinholdtsen ]
+ * Drop sysv-rc-conf as suggests. It do not work with dependency based
+ boot ordering.
+ * Adjust initscripts.postinst to use --compare-versions checks that
+ cause relevant code to only run on upgrades, and not on first time
+ install, fixing debootstrap fakechroot failure (Closes: #720584).
+ Patch from Andreas Mohr.
+ * Add 'status' support to all init.d scripts (Closes: #641669).
+ Based on patch from Peter Eisentraut.
+
+ -- Petter Reinholdtsen <pere at debian.org> Mon, 21 Apr 2014 10:12:00 +0200
+
+sysvinit (2.88dsf-54) experimental; urgency=medium
+
+ [ Justus Winter ]
+ * hurd-i386 runsystem.sysv: honor init=something in the kernel command line
+ (Closes: #742615).
+
+ [ Petter Reinholdtsen ]
+ * Look for insserv /usr/lib/insserv/insserv and /sbin/insserv, to
+ handle newer insserv packages where it no longer is in the default
+ PATH.
+ * Let the service script pass environment variables LANGUAGE,
+ LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY,
+ LC_MESSAGES, LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE,
+ LC_MEASUREMENT, LC_IDENTIFICATION and LC_ALL (in other word, all
+ locale related environment variables) in addition to LANG to the
+ init.d scripts, in accordance with the principle of least surprise
+ (Closes: #606875).
+ * Change checkfs/checkroot and avoid printing the kernel command line
+ during boot if forcefsck is set (Closes: #587954).
+
+ -- Petter Reinholdtsen <pere at debian.org> Thu, 17 Apr 2014 15:01:34 +0200
+
sysvinit (2.88dsf-53.4) unstable; urgency=medium
* Added bootlogd patch to output on multiple consoles (Closes: #181756).
diff -ur ../test/sysvinit-2.88dsf/debian/control ./debian/control
--- ../test/sysvinit-2.88dsf/debian/control 2014-08-03 21:00:43.000000000 +0200
+++ ./debian/control 2014-10-25 23:24:19.727702352 +0200
@@ -16,8 +16,8 @@
libsepol1-dev [linux-any]
Standards-Version: 3.9.5
Homepage: http://savannah.nongnu.org/projects/sysvinit
-Vcs-Git: git://anonscm.debian.org/collab-maint/sysvinit
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/sysvinit
+Vcs-Git: git://anonscm.debian.org/collab-maint/sysvinit.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/sysvinit.git
Package: sysvinit
Priority: optional
@@ -47,7 +47,8 @@
debianutils (>= 4),
# Required for TERM=xterm switch (see #605777)
kbdcontrol (>= 8.2+ds2-6) [kfreebsd-any]
-Replaces: sysvinit (<< 2.88dsf-44~),
+Conflicts: systemd-sysv, upstart
+Replaces: sysvinit (<< 2.88dsf-44~), systemd-sysv, upstart
Description: System-V-like init utilities
This package contains programs required for booting
a Debian system and doing basic process management.
@@ -78,7 +79,7 @@
Recommends: lsb-base (>= 3.2-14)
Conflicts: file-rc
Replaces: file-rc
-Suggests: sysv-rc-conf, bum
+Suggests: bum
Depends:
${misc:Depends},
sysvinit-utils (>= 2.86.ds1-62),
diff -ur ../test/sysvinit-2.88dsf/debian/initscripts.postinst ./debian/initscripts.postinst
--- ../test/sysvinit-2.88dsf/debian/initscripts.postinst 2014-01-27 22:41:07.000000000 +0100
+++ ./debian/initscripts.postinst 2014-04-21 09:30:16.000000000 +0200
@@ -61,16 +61,16 @@
}
# In 2.88dsf-23 the "mountoverflowtmp" script was dropped entirely.
-if dpkg --compare-versions "$PREV_VER" lt "2.88dsf-23" ; then
+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 "2.88dsf-41+jessie1" ; then
+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 "2.88dsf-23" ; then
+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).:' \
diff -ur ../test/sysvinit-2.88dsf/debian/service/service ./debian/service/service
--- ../test/sysvinit-2.88dsf/debian/service/service 2014-02-19 22:29:13.000000000 +0100
+++ ./debian/service/service 2014-10-25 23:20:33.078271812 +0200
@@ -81,7 +81,7 @@
*)
if ! is_ignored_file "${SERVICE}" \
&& [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- out=$(env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status 2>&1)
+ out=$(env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status 2>&1)
retval=$?
if echo "$out" | egrep -iq "usage:"; then
#printf " %s %-60s %s\n" "[?]" "$SERVICE:" "unknown" 1>&2
@@ -98,7 +98,7 @@
continue
fi
fi
- #env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status
+ #env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status
fi
;;
esac
@@ -112,8 +112,8 @@
ACTION="restart"
else
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" stop
- env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" start
+ env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" stop
+ env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" start
exit $?
fi
fi
@@ -129,8 +129,11 @@
esac
done
+# Operate against system upstart, not session
+unset UPSTART_SESSION
if [ -r "/etc/init/${SERVICE}.conf" ] && which initctl >/dev/null \
- && initctl version 2>/dev/null | grep -q upstart
+ && initctl version 2>/dev/null | grep -q upstart \
+ && initctl status ${SERVICE} 2>/dev/null 1>/dev/null
then
# Upstart configuration exists for this job and we're running on upstart
case "${ACTION}" in
@@ -138,15 +141,13 @@
# Action is a valid upstart action
exec ${ACTION} ${SERVICE} ${OPTIONS}
;;
- restart)
+ restart|force-reload)
# Map restart to the usual sysvinit behavior.
+ # Map force-reload to restart as per Debian policy 9.3.2,
+ # since there is no way to know if "reload" is supported
stop ${SERVICE} ${OPTIONS} || :
exec start ${SERVICE} ${OPTIONS}
;;
- force-reload)
- # Upstart just uses reload for force-reload
- exec reload ${SERVICE} ${OPTIONS}
- ;;
esac
fi
@@ -154,7 +155,7 @@
run_via_sysvinit() {
# Otherwise, use the traditional sysvinit
if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
- exec env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS}
+ exec env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS}
else
echo "${SERVICE}: unrecognized service" >&2
exit 1
diff -ur ../test/sysvinit-2.88dsf/debian/service/service.8 ./debian/service/service.8
--- ../test/sysvinit-2.88dsf/debian/service/service.8 2014-02-07 11:37:19.000000000 +0100
+++ ./debian/service/service.8 2014-04-17 00:19:35.000000000 +0200
@@ -93,7 +93,7 @@
.SH ENVIRONMENT
.TP
-\fBLANG\fR, \fBTERM\fR
+\fBLANG\fR, \fBLANGUAGE\fR, \fBLC_CTYPE\fR, \fBLC_NUMERIC\fR, \fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_MONETARY\fR, \fBLC_MESSAGES\fR, \fBLC_PAPER\fR, \fBLC_NAME\fR, \fBLC_ADDRESS\fR, \fBLC_TELEPHONE\fR, \fBLC_MEASUREMENT\fR, \fBLC_IDENTIFICATION\fR, \fBLC_ALL\fR, \fBTERM\fR
The only environment variables passed to the init scripts.
.SH SEE ALSO
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/hurd/runsystem.sysv ./debian/src/initscripts/etc/hurd/runsystem.sysv
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/hurd/runsystem.sysv 2014-02-07 11:37:19.000000000 +0100
+++ ./debian/src/initscripts/etc/hurd/runsystem.sysv 2014-04-17 00:17:04.000000000 +0200
@@ -19,6 +19,11 @@
# Shell used for normal single-user startup.
SHELL=/bin/sh
+# The init program to call.
+#
+# Can be overridden using init=something in the kernel command line.
+init=/sbin/init
+
###
# If we get a SIGLOST, attempt to reopen the console in case
@@ -82,6 +87,9 @@
shift
case "$arg" in
--*) ;;
+ init=*)
+ eval "${arg}"
+ ;;
*=*) ;;
-*)
flags="${flags}${arg#-}"
@@ -111,4 +119,4 @@
fsysopts / --update --readonly
# Finally, start the actual SysV init.
-exec /sbin/init ${single} -a
+exec ${init} ${single} -a
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/bootmisc.sh ./debian/src/initscripts/etc/init.d/bootmisc.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/bootmisc.sh 2014-02-10 00:23:41.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/bootmisc.sh 2014-04-21 09:44:51.000000000 +0200
@@ -47,7 +47,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkfs.sh ./debian/src/initscripts/etc/init.d/checkfs.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkfs.sh 2014-02-10 00:23:41.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/checkfs.sh 2014-04-21 09:46:26.000000000 +0200
@@ -59,7 +59,7 @@
# or md swap partitions. fsck can suck RAM.
swaponagain 'lvm and md'
- if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline
+ if [ -f /forcefsck ] || grep -q -s -w -i "forcefsck" /proc/cmdline
then
force="-f"
else
@@ -143,7 +143,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkroot-bootclean.sh ./debian/src/initscripts/etc/init.d/checkroot-bootclean.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkroot-bootclean.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/checkroot-bootclean.sh 2014-04-21 09:42:25.000000000 +0200
@@ -31,7 +31,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkroot.sh ./debian/src/initscripts/etc/init.d/checkroot.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/checkroot.sh 2014-02-04 23:20:15.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/checkroot.sh 2014-04-17 12:52:20.000000000 +0200
@@ -197,7 +197,7 @@
#
if [ "$rootcheck" = yes ]
then
- if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline
+ if [ -f /forcefsck ] || grep -q -s -w -i "forcefsck" /proc/cmdline
then
force="-f"
else
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/halt ./debian/src/initscripts/etc/init.d/halt
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/halt 2014-02-09 23:47:46.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/halt 2014-04-21 09:50:44.000000000 +0200
@@ -64,7 +64,7 @@
}
case "$1" in
- start)
+ start|status)
# No-op
;;
restart|reload|force-reload)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/killprocs ./debian/src/initscripts/etc/init.d/killprocs
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/killprocs 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/killprocs 2014-04-21 09:46:52.000000000 +0200
@@ -52,7 +52,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountall-bootclean.sh ./debian/src/initscripts/etc/init.d/mountall-bootclean.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountall-bootclean.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountall-bootclean.sh 2014-04-21 09:47:00.000000000 +0200
@@ -23,7 +23,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountall.sh ./debian/src/initscripts/etc/init.d/mountall.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountall.sh 2014-01-27 22:41:07.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountall.sh 2014-04-21 09:47:07.000000000 +0200
@@ -83,7 +83,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountdevsubfs.sh ./debian/src/initscripts/etc/init.d/mountdevsubfs.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountdevsubfs.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountdevsubfs.sh 2014-04-21 09:47:15.000000000 +0200
@@ -58,7 +58,7 @@
restart|reload|force-reload)
mount_filesystems remount
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountkernfs.sh ./debian/src/initscripts/etc/init.d/mountkernfs.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountkernfs.sh 2014-01-27 22:41:02.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountkernfs.sh 2014-04-21 09:47:23.000000000 +0200
@@ -65,7 +65,7 @@
restart|reload|force-reload)
mount_filesystems remount
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountnfs-bootclean.sh ./debian/src/initscripts/etc/init.d/mountnfs-bootclean.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountnfs-bootclean.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountnfs-bootclean.sh 2014-04-21 09:47:33.000000000 +0200
@@ -23,7 +23,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountnfs.sh ./debian/src/initscripts/etc/init.d/mountnfs.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/mountnfs.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/mountnfs.sh 2014-04-21 09:51:45.000000000 +0200
@@ -94,7 +94,8 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
+ # No-op
;;
*)
echo "Usage: $0 start|stop" >&2
@@ -102,4 +103,4 @@
;;
esac
-: exit 0
+:
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/rc.local ./debian/src/initscripts/etc/init.d/rc.local
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/rc.local 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/rc.local 2014-04-21 09:52:19.000000000 +0200
@@ -32,7 +32,9 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
+ # No-op
+ exit 0
;;
*)
echo "Usage: $0 start|stop" >&2
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/reboot ./debian/src/initscripts/etc/init.d/reboot
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/reboot 2014-02-09 23:47:46.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/reboot 2014-04-21 09:49:07.000000000 +0200
@@ -31,6 +31,9 @@
stop)
do_stop
;;
+ status)
+ exit 0
+ ;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/sendsigs ./debian/src/initscripts/etc/init.d/sendsigs
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/sendsigs 2014-03-28 13:31:34.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/sendsigs 2014-04-21 09:52:59.000000000 +0200
@@ -107,7 +107,7 @@
}
case "$1" in
- start)
+ start|status)
# No-op
;;
restart|reload|force-reload)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/single ./debian/src/initscripts/etc/init.d/single
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/single 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/single 2014-04-21 09:49:28.000000000 +0200
@@ -25,7 +25,7 @@
echo "Error: argument '$1' not supported" >&2
exit 3
;;
- stop)
+ stop|status)
# No-op
;;
*)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountfs ./debian/src/initscripts/etc/init.d/umountfs
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountfs 2014-02-07 11:37:19.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/umountfs 2014-04-21 09:49:46.000000000 +0200
@@ -111,7 +111,7 @@
}
case "$1" in
- start)
+ start|status)
# No-op
;;
restart|reload|force-reload)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountnfs.sh ./debian/src/initscripts/etc/init.d/umountnfs.sh
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountnfs.sh 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/umountnfs.sh 2014-04-21 09:49:58.000000000 +0200
@@ -81,7 +81,7 @@
}
case "$1" in
- start)
+ start|status)
# No-op
;;
restart|reload|force-reload)
diff -ur ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountroot ./debian/src/initscripts/etc/init.d/umountroot
--- ../test/sysvinit-2.88dsf/debian/src/initscripts/etc/init.d/umountroot 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/initscripts/etc/init.d/umountroot 2014-04-21 09:50:14.000000000 +0200
@@ -30,7 +30,7 @@
}
case "$1" in
- start)
+ start|status)
# No-op
;;
restart|reload|force-reload)
diff -ur ../test/sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d ./debian/src/sysv-rc/sbin/invoke-rc.d
--- ../test/sysvinit-2.88dsf/debian/src/sysv-rc/sbin/invoke-rc.d 2014-01-27 22:21:13.000000000 +0100
+++ ./debian/src/sysv-rc/sbin/invoke-rc.d 2014-10-25 23:23:53.579536888 +0200
@@ -24,7 +24,6 @@
RUNLEVELHELPER=/sbin/runlevel
POLICYHELPER=/usr/sbin/policy-rc.d
INITDPREFIX=/etc/init.d/
-UPSTARTDIR=/etc/init/
RCDPREFIX=/etc/rc
# Options
@@ -268,10 +267,12 @@
;;
esac
+# Operate against system upstart, not session
+unset UPSTART_SESSION
# If we're running on upstart and there's an upstart job of this name, do
# the rest with upstart instead of calling the init script.
if which initctl >/dev/null && initctl version 2>/dev/null | grep -q upstart \
- && [ -e "$UPSTARTDIR/${INITSCRIPTID}.conf" ]
+ && inictl status ${INITSCRIPTID} 1>/dev/null 2>/dev/null
then
is_upstart=1
elif test -d /run/systemd/system ; then
diff -ur ../test/sysvinit-2.88dsf/debian/src/sysv-rc/sbin/update-rc.d ./debian/src/sysv-rc/sbin/update-rc.d
--- ../test/sysvinit-2.88dsf/debian/src/sysv-rc/sbin/update-rc.d 2014-01-27 22:41:02.000000000 +0100
+++ ./debian/src/sysv-rc/sbin/update-rc.d 2014-10-25 23:15:12.404262681 +0200
@@ -172,9 +172,12 @@
$scriptname = shift @args;
$action = shift @args;
+ my $insserv = "/usr/lib/insserv/insserv";
+ # Fallback for older insserv package versions [2014-04-16]
+ $insserv = "/sbin/insserv" if ( -x "/sbin/insserv");
if ("remove" eq $action) {
if ( -f "/etc/init.d/$scriptname" ) {
- my $rc = system("/sbin/insserv", @opts, "-r", $scriptname) >> 8;
+ my $rc = system($insserv, @opts, "-r", $scriptname) >> 8;
if (0 == $rc && !$notreally) {
remove_last_action($scriptname);
}
@@ -183,7 +186,7 @@
} else {
# insserv removes all dangling symlinks, no need to tell it
# what to look for.
- my $rc = system("insserv", @opts) >> 8;
+ my $rc = system($insserv, @opts) >> 8;
if (0 == $rc && !$notreally) {
remove_last_action($scriptname);
}
@@ -200,7 +203,7 @@
}
if ( -f "/etc/init.d/$scriptname" ) {
- my $rc = system("insserv", @opts, $scriptname) >> 8;
+ my $rc = system($insserv, @opts, $scriptname) >> 8;
if (0 == $rc && !$notreally) {
save_last_action($scriptname, @orig_argv);
}
@@ -216,7 +219,7 @@
insserv_toggle($notreally, $action, $scriptname, @args);
# Call insserv to resequence modified links
- my $rc = system("insserv", @opts, $scriptname) >> 8;
+ my $rc = system($insserv, @opts, $scriptname) >> 8;
if (0 == $rc && !$notreally) {
save_last_action($scriptname, @orig_argv);
}
diff -ur ../test/sysvinit-2.88dsf/debian/sysvinit-core.config ./debian/sysvinit-core.config
--- ../test/sysvinit-2.88dsf/debian/sysvinit-core.config 2014-01-27 22:41:07.000000000 +0100
+++ ./debian/sysvinit-core.config 2014-04-21 09:06:26.000000000 +0200
@@ -8,8 +8,8 @@
. /usr/share/debconf/confmodule
# summary of how this script can be called:
-# * <config> `configure' <installed-version>
-# * <config> `reconfigure' <installed-version>
+# * <config> 'configure' <installed-version>
+# * <config> 'reconfigure' <installed-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
@@ -22,7 +22,8 @@
| md5sum --status --check -; then
# The file is unmodified, update it silently.
:
- elif fgrep -q '/libexec/getty' /etc/inittab; then
+ elif [ $(fgrep -c -e '/libexec/getty' /etc/inittab) -gt 0 ] || \
+ [ $(grep -c '^c:' /etc/inittab) -eq 0 ]; then
db_input low sysvinit/hurd-fix-inittab || true
db_go
fi
@@ -30,7 +31,7 @@
;;
*)
- echo "config script called with unknown argument \`$1'" >&2
+ echo "config script called with unknown argument '$1'" >&2
exit 1
;;
esac
diff -ur ../test/sysvinit-2.88dsf/debian/sysvinit-core.postinst ./debian/sysvinit-core.postinst
--- ../test/sysvinit-2.88dsf/debian/sysvinit-core.postinst 2014-01-27 22:41:07.000000000 +0100
+++ ./debian/sysvinit-core.postinst 2014-04-21 08:58:57.000000000 +0200
@@ -86,15 +86,27 @@
if [ ! -f /etc/inittab ]
then
cp -p /usr/share/sysvinit/inittab /etc/inittab
-elif [ "$(uname)" = GNU ] && fgrep -q '/libexec/getty' /etc/inittab; then
- rm -f -- /etc/inittab.dpkg-new
- sed -e '/^[^#]/ s|/libexec/getty|/sbin/getty|' \
- < /etc/inittab > /etc/inittab.dpkg-new
+elif [ "$(uname)" = GNU ]; then
+ ITAB=/etc/inittab
+ ITABNEW=${ITAB}.dpkg-new
+ cp $ITAB $ITABNEW
+ if fgrep -q '/libexec/getty' $ITABNEW; then
+ sed -e 's|/libexec/getty|/sbin/getty|' \
+ -i $ITABNEW
+ fi
+ if ! grep -q '^c:' $ITABNEW; then
+ sed -e '/^6:/a c:23:respawn:/sbin/getty 38400 console' \
+ -i $ITABNEW
+ fi
- db_get sysvinit/hurd-fix-inittab
- if [ "${RET}" = "true" ]; then
- mv -- /etc/inittab /etc/inittab.dpkg-old
- mv -- /etc/inittab.dpkg-new /etc/inittab
+ if ! diff $ITAB $ITABNEW >/dev/null; then
+ db_get sysvinit/hurd-fix-inittab
+ if [ "${RET}" = "true" ]; then
+ mv -- $ITAB ${ITAB}.dpkg-old
+ mv -- $ITABNEW $ITAB
+ fi
+ else
+ rm -f -- $ITABNEW
fi
fi
diff -ur ../test/sysvinit-2.88dsf/debian/sysvinit-core.templates ./debian/sysvinit-core.templates
--- ../test/sysvinit-2.88dsf/debian/sysvinit-core.templates 2014-02-08 00:55:30.000000000 +0100
+++ ./debian/sysvinit-core.templates 2014-10-25 23:22:33.167028731 +0200
@@ -1,14 +1,14 @@
Template: sysvinit/hurd-fix-inittab
Type: boolean
-_Description: Update getty file names in /etc/inittab?
- Your /etc/inittab seems to use /libexec/getty as getty. The default
- inittab has been changed, however your /etc/inittab has been
- modified. Note that sysvinit has never been used to boot an Hurd
- system, so any errors in that file would not have shown up.
+_Description: Update getty pathnames and add hurd-console?
+ Your /etc/inittab seems to use /libexec/getty as getty and/or to miss
+ hurd-console entry. The default inittab has been changed, however your
+ /etc/inittab has been modified. Note that sysvinit has not been used
+ to boot an Hurd system for long, so any errors in that file would not
+ have shown up earlier.
.
- If you want to change /etc/inittab to use /sbin/getty as getty, choose
- yes. If you choose yes, a backup will be stored in /etc/inittab.dpkg-old.
+ If you allow this change, a backup will be stored in /etc/inittab.dpkg-old.
.
- If you choose no, an updated inittab will be written to
+ If you don't allow this change, an updated inittab will be written to
/etc/inittab.dpkg-new. Please review the changes and update your
/etc/inittab accordingly.
Only in .: .git
What do the rest of you think is the best way forward?
--
Happy hacking
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list