bugSystem V style init programs - Bugs: bug #31752, Init.c fails to create the RUN_LVL...

 
 

bug #31752: Init.c fails to create the RUN_LVL record in utmp

Submitted by:  None
Submitted on:  Thu 02 Dec 2010 03:25:09 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Discussion locked!

 

Fri 03 Dec 2010 09:26:40 AM UTC, comment #1:

The file system is not mounted read/write in single user
mode ... this is not a bug of SystemV init ... IMHO it is
even not a bug of the boot scripts its self povided by
RedHat, it is simply a usage error. This because booting
into single user mode is e.g. usefull to repair the
local file system and for this the file system should
be mounted readonly otherwise you may loose data.

Beside this if you think it us a bug please report this
to the author of the boot scripts which is your distributor.

Dr. Werner Fink <wfink>
Project Administrator
Thu 02 Dec 2010 03:25:09 PM UTC, original submission:

Description of problem:
We are using runlevel and who -r in single user mode.
runlevel returns unknown.

How reproducible:
Every time a RHEL5 system boots into single user mode.

Steps to Reproduce:
boot RHEL5 into single user mode and run runlevel or who -r

Actual results:
runlevel returns unknown
who -r returns nothing.

Expected results:
runlevel returns N S

on investigation runlevel (part of sysV initscripts) relies on
a RUN_LVL (1) entry in /var/run/utmp.

When booting into single user mode using kernel parameters: single at grub boot prompt. /var/run/utmp is not updated with current runlevel. In all other contexts it appears to be.

/etc/rc.sysinit checks and truncates /var/run/utmp.

So to conclude, /var/run/utmp exists but init fails to populate it with RUN_LVL when runlevel == 'S':

void write_utmp_wtmp
( char * user,
char * id,
int pid,
int type,
char * line
)

write_utmp_wtmp("runlevel", "~~", foo + 256*runlevel, RUN_LVL, "~");

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 03 Dec 2010 09:26:40 AM UTCwfinkStatusNone=>Invalid
  Open/ClosedOpen=>Closed
  Discussion LockUnlocked=>Locked

Back to the top


Powered by Savane 3.1-cleanup1