Bug#632091: initscripts: rootfs over nfs hangs at reboot
Dmitry Bogatov
KAction at debian.org
Sun Mar 10 19:12:44 GMT 2019
[2019-03-09 17:59] Pierre Ynard <linkfanel at yahoo.fr>
>
> part text/plain 1139
> > > My opinion is that /etc/init.d/reboot should honor NETDOWN, and
> > > source it from /etc/default/halt. And then NETDOWN should be
> > > documented in /etc/default/halt, as requested in #703844.
> >
> > Actually, #696910 suggests that NETDOWN could also be disabled if
> > iSCSI is detected.
>
> Sorry for changing my mind again, but I found yet another bug about
> this, #632091, which points out that /etc/init.d/networking already
> uses extensive code to detect iSCSI and other network mounts. So maybe
> we should reuse that code in halt and reboot scripts to disable -i; and
> also integrate and support NETDOWN at reboot, because apparently people
> have been using it to handle this kind of setup, in addition to its
> original purpose about wake-on-lan.
>
> Allowing the admin to configure /etc/default/halt is good, detecting
> failure cases so it works out of the box is better. And if we
> don't want to expand initscripts knowledge about every problematic
> network filesystem, considering that other packages can't edit
> /etc/default/halt, it might be even better to let them drop files
> somewhere, maybe in /run/network, to signal this.
Well, let's start with something. What about this patch, that reuses
/etc/default/halt? I believe it is, maybe not most principal, but
solution to bug at hand.
From 3d53d5e2ecfec0f2b3b2e1fc95e4c56c4f6ddf78 Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <KAction at debian.org>
Date: Sat, 9 Mar 2019 20:30:12 +0000
Subject: [PATCH] Make /etc/init.d/reboot respect NETDOWN variable
# @@ -12,12 +12,17 @@
# +[ -f /etc/default/halt ] && . /etc/default/halt
# - reboot -d -f -i
# + local netdown="-i"
# + if [ "${NETDOWN}" = no ] ; then
# + netdown=""
# + fi
# + reboot -d -f ${netdown}
---
debian/src/initscripts/etc/init.d/reboot | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/src/initscripts/etc/init.d/reboot b/debian/src/initscripts/etc/init.d/reboot
index e1dcb1cc..cf56c1a4 100755
--- a/debian/src/initscripts/etc/init.d/reboot
+++ b/debian/src/initscripts/etc/init.d/reboot
@@ -12,12 +12,17 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/lsb/init-functions
+[ -f /etc/default/halt ] && . /etc/default/halt
do_stop () {
# Message should end with a newline since kFreeBSD may
# print more stuff (see #323749)
log_action_msg "Will now restart"
- reboot -d -f -i
+ local netdown="-i"
+ if [ "${NETDOWN}" = no ] ; then
+ netdown=""
+ fi
+ reboot -d -f ${netdown}
}
case "$1" in
--
Note, that I send and fetch email in batch, once every 24 hours.
If matter is urgent, try https://t.me/kaction
--
More information about the Debian-init-diversity
mailing list