[intrepid] /etc/init.d/rc level parsing is fragile

Bug #303074 reported by Stephan Trebels
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)

Bug Description

Binary package hint: sysvinit

/etc/init.d/rc attempts to group scripts in calls to startup by level. The code to do this has certain assumptions built in. like a name always starting with a letter. For better compatibility with update-rc.d I'd suggest to strip the prefix and than take the next two characters for the level. This is a lot more stable against double starts.

Revision history for this message
Stephan Trebels (ncubede) wrote :
Revision history for this message
Alexander Sack (asac) wrote :

was there any actual breakage because of this?

Revision history for this message
Stephan Trebels (ncubede) wrote :

Personally I had a few local startup scripts tagged as SA1 to SA3, which I agree is debatable, but happens to work on all flavours of UNIX I have encountered so far. The effect was a double start of all daemons on init level 2.

If we discard this as an invalid example, there is no guarantee, that the filename part following S?? has to start with an alphabetic letter, so the current parsing is certainly incorrect.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers