bugSystem V style init programs - Bugs: bug #35859, Small letter 's' in inittab...


bug #35859: Small letter 's' in inittab doesn't work

Submitted by:  None
Submitted on:  Thu 15 Mar 2012 09:17:32 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 16 Mar 2012 03:50:49 PM UTC, comment #1:

The `S' in inittab is special, with this you may override the
intrinisic emergency shell of SysVinit. To use an other program
as /sbin/sulogin, nothing more and nothing less (IMHO).

You should not use those special ID for others like once entries.

Dr. Werner Fink <wfink>
Project Administrator
Thu 15 Mar 2012 09:17:32 PM UTC, original submission:

init version: 2.88dsf

For example:

----- /etc/initscript -----
echo initscript: $1 $2 $3 $4 $5 $6
eval exec "$4"

----- /etc/inittab -----
abc:3s4:once:/bin/echo abc
def:3S4:once:/bin/echo def

Then execute command lines:
"init 5"
"init 4"

It prints:
initscript: abc 3s4 once /bin/echo abc
small letter 's' ^

In single-user level line "abc" doesn't work. Is it correct? Maybe only "S" letter is allowed in runlevels field?

I discovered something strange in read_inittab function:

> for(f = 0; f < (int)sizeof(rlevel) - 1 && rlevel[f]; f++) {
> ch->rlevel[f] = rlevel[f];
> if (ch->rlevel[f] == 's') ch->rlevel[f] = 'S';
> }

------> strncpy(ch->rlevel, rlevel, sizeof(ch->rlevel) - 1);

Note: start_if_needed is case sensitive.

> void start_if_needed(void)
> ...
> if (strchr(ch->rlevel, runlevel) ||
> ...



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by newguy (Updated the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Feb 2018 02:49:57 AM UTCnewguyOpen/ClosedOpen=>Closed
    Fri 16 Mar 2012 03:50:49 PM UTCwfinkStatusNone=>Invalid

    Back to the top

    Powered by Savane 3.1-cleanup1