update-rc.d: Use of uninitialized value
Bug #312764 reported by
Jason Oster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Debian) |
Fix Released
|
Unknown
|
|||
sysvinit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: sysv-rc
osterj@CN212409:~$ update-rc.d -n udev start 00 0
Use of uninitialized value $level in string ne at /usr/sbin/
Use of uninitialized value $level in pattern match (m//) at /usr/sbin/
update-rc.d: error: expected runlevel [0-9S] (did you forget "." ?)
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> defaults [NN | SS KK]
update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
-n: not really
-f: force
The script works as it is supposed to, except for the Perl errors reported. (The list of run-levels is not terminated by a period.)
Related branches
Changed in sysvinit: | |
status: | New → Confirmed |
Changed in sysvinit: | |
status: | Unknown → Fix Committed |
Changed in sysvinit (Debian): | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The documentation is a bit unclear about this, but you should end your command with a "." (dot). The dot is mandatory:
pet@workmate$ update-rc.d -n mysql start 99 1 2 3 .
System startup links for /etc/init.d/mysql already exist.
pet@workmate$ update-rc.d -n mysql start 99 1 2 3
Use of uninitialized value $level in string ne at update-rc.d line etc etc
I agree that the script doesn't handle it very well when the final dot is missing. This should be fixed. I suggest the patch which I attached to this bug (diff against 2.86.ds1-61ubuntu1 jaunty)
I'll create a debdiff shortly and ask someone to sponsor it into jaunty. Afterwards, I'll inform the Debian guys.