[Pkg-sysvinit-devel] Bug#502197: NetworkManager starts up twice
Loïc Minier
lool at dooz.org
Tue Oct 14 13:01:44 UTC 2008
Package: sysv-rc
Version: 2.86.ds1-61
Severity: normal
Tags: patch
Hi there,
I can see a failure to start NetworkManager for a second time in my
startup messages.
copy /etc/init.d/rc and set it to debug mode by uncommenting the echo
near the top.
rc 2 outputs:
...
/etc/rc2.d/S25pulseaudio start
splash_progress 97
/etc/rc2.d/S30NetworkManager start
splash_progress 99
/etc/rc2.d/S30NetworkManager start
splash_progress 100
/etc/rc2.d/S30gdm start
...
this is due to a case sensitive case statement in the rc script;
changing a-z to a-zA-Z makes the level being correctly computed again
(otherwise sysv-rc think there's a 30N level but also includes
NetworkManager in the 30 level...).
I've reported this to Ubuntu initially at
<https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/283200>
and confirmed that the bug also affects Debian's rc script.
The debdiff I provided for the Ubuntu package is attached for the
documentation of the fix (there are two places to fix).
It fixes the bug for me and another person tested and confirmed the
fix.
Cheers,
--
Loïc Minier
-------------- next part --------------
diff -u sysvinit-2.86.ds1/debian/changelog sysvinit-2.86.ds1/debian/changelog
--- sysvinit-2.86.ds1/debian/changelog
+++ sysvinit-2.86.ds1/debian/changelog
@@ -1,3 +1,11 @@
+sysvinit (2.86.ds1-59ubuntu13) intrepid; urgency=low
+
+ * Fix computing of runlevel in debian/sysv-rc/etc/init.d/rc by allowing A-Z
+ in init scripts names; the 30NetworkManager script was launched twice,
+ once as level 30N and once as part of the globbing of runlevel 30.
+
+ -- Loic Minier <lool at dooz.org> Tue, 14 Oct 2008 14:33:25 +0200
+
sysvinit (2.86.ds1-59ubuntu12) intrepid; urgency=low
* debian/initscripts/etc/init.d/check{root,fs}.sh: Disable indeterminate
diff -u sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
--- sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
+++ sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
@@ -285,7 +285,7 @@
do
# Extract order value from symlink
level=${s#/etc/rc$runlevel.d/K}
- level=${level%%[a-z]*}
+ level=${level%%[a-zA-Z]*}
if [ "$level" = "$CURLEVEL" ]
then
continue
@@ -325,7 +325,7 @@
do
# Extract order value from symlink
level=${s#/etc/rc$runlevel.d/S}
- level=${level%%[a-z]*}
+ level=${level%%[a-zA-Z]*}
if [ "$level" = "$CURLEVEL" ]
then
continue
More information about the Pkg-sysvinit-devel
mailing list