Bug#1136287: initscripts: Dangerous "-e" in rc.local's shebang silently aborts script
alexandre.ferrieux at orange.com
alexandre.ferrieux at orange.com
Mon May 11 15:50:24 BST 2026
Package: initscripts
Version: 3.14-4
Severity: important
Tags: patch
Dear Maintainer,
Since sysvinit 2.88dsf-60 (commit 3e74709f0 in https://salsa.debian.org/debian/sysvinit ),
the default /etc/rc.local file has included the "-e" flag in the shebang:
#!/bin/sh -e
The semantics is that any failing command in the script *silently* aborts its execution.
As typically one starts many unrelated things for rc.local, this is completely unwarranted.
Indeed, the order may be irrelevant, and hence the failure to start the commands following
the failing one does not carry any added value. In addition, there is no overall "failed to
boot" situation that would bring the issue to the adminbistrator's attention, so there's
an extra "surprise" effect.
Since bullseye, we have systematically had to fix that manually in production machines.
Of course, the file being marked "conffiles" means the change is kept across upgrades;
However for fresh installs, the manual fix is always needed.
Please consider fixing it in the official package.
Thanks in advance,
-Alex
-- System Information:
Debian Release: 13.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages initscripts depends on:
ii sysv-rc 3.14-4
ii sysvinit-utils 3.14-4
Versions of packages initscripts recommends:
ii e2fsprogs 1.47.2-3+b10
ii psmisc 23.7-2
ii util-linux-extra 2.41-5
initscripts suggests no packages.
-- Configuration Files:
/etc/rc.local changed [not included]
-- debconf-show failed
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
-------------- next part --------------
diff --git a/debian/src/initscripts/etc/rc.local b/debian/src/initscripts/etc/rc.local
index ef9a39f2..c4878321 100644
--- a/debian/src/initscripts/etc/rc.local
+++ b/debian/src/initscripts/etc/rc.local
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
#
# rc.local
#
More information about the Debian-init-diversity
mailing list