Bug 453249 - who -r command do not report last runlevel
Summary: who -r command do not report last runlevel
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-28 11:07 UTC by Gian Piero De Lolliis
Modified: 2008-07-09 02:48 UTC (History)
1 user (show)

Fixed In Version: 6.10-27.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-09 02:48:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gian Piero De Lolliis 2008-06-28 11:07:58 UTC
Description of problem:
the command who -r do no report last runlevel
eg.
who -r
         run-level 3  2008-06-28 12:01                   last=


Version-Release number of selected component (if applicable):
coreutils-6.10-25.fc9.i386


How reproducible:
in a terminal with 
who -r

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ondrej Vasik 2008-06-30 07:38:38 UTC
Thanks for report, but it works for OK me on my machine. To better address the
problem, please answer following questions:
1)What does runlevel command print?
2)rpm -V coreutils
3)Is this upgrade from older Fedora's to F9 or clean installation?
TIA for answers.

Comment 2 Gian Piero De Lolliis 2008-06-30 13:56:38 UTC
Hi, 

actually the machine is in runlevel 3 with user root logged in.

1) [root@feedo ~]# who -r
         run-level 3  2008-06-30 18:40                   last=
2) rpm -V coreutils do not report nothing

3) this is a clean installation of F9 (no upgrade from previous version) with
all updates applied. 

Kind regards,
MT

Comment 3 Ondrej Vasik 2008-06-30 18:25:30 UTC
Thanks for quick response, but in #1 I asked for command `runlevel` (from
package SysVinit, usually located at /sbin/runlevel). That command has slightly
different implementation of getting runlevel than who -r (but both should report
the same results). Please provide the output from command `runlevel`. TIA again... 

Comment 4 Gian Piero De Lolliis 2008-07-01 06:06:52 UTC
Sorry for misunderstanting, the output of runlevel command is:

[root@feedo ~]# runlevel
N 3

Kind regards,
MT

Comment 5 Ondrej Vasik 2008-07-01 10:08:11 UTC
Thanks for information, 
that's quiet strange - as runlevel reports correct values (which should cause
output of `who -r` like "run-level 3  Jul  1 09:22                   last=S" -
and that's exactly output which I'm getting with F-9 coreutils who binary (with
same `runlevel` command output as you) . Will check the code of gnulib's
readutmp.c/h as this is responsible for computing who -r runlevel result. Just
for completeness, command `type who` returns correctly "who is hashed
(/usr/bin/who)"? 

Comment 6 Ondrej Vasik 2008-07-01 13:18:10 UTC
Actually there is issue with documentation as well (as I could not find some
options from --help in coreutils texinfo documentation). I still can't reproduce
the issue on my machine even with the runlevel 3, but I found one difference in
runlevel and who -r code, which could be relevant. Could you please check
coreutils rpm from http://koji.fedoraproject.org/koji/taskinfo?taskID=689642 ? TIA. 

Comment 7 Gian Piero De Lolliis 2008-07-01 14:38:03 UTC
(In reply to comment #5)
> command `type who` returns correctly "who is hashed
> (/usr/bin/who)"? 

The output is the same:
[root@feedo ~]# type who
who is /usr/bin/who

Kind regards,
MT


Comment 8 Gian Piero De Lolliis 2008-07-01 14:52:12 UTC
(In reply to comment #6)
> Actually there is issue with documentation as well (as I could not find some
> options from --help in coreutils texinfo documentation). I still can't reproduce
> the issue on my machine even with the runlevel 3, but I found one difference in
> runlevel and who -r code, which could be relevant. Could you please check
> coreutils rpm from http://koji.fedoraproject.org/koji/taskinfo?taskID=689642 ?
TIA. 

Hi, I've update coreutils package with the one you reported me
(coreutils-6.10-27.fc9.i386) and now i can read the last state from who -r command:

[root@feedo Desktop]# who -r
         run-level 3  2008-07-01 18:23                   last=S

Kind regards,
MT

Comment 9 Fedora Update System 2008-07-07 09:59:09 UTC
coreutils-6.10-27.fc9 has been submitted as an update for Fedora 9

Comment 10 Ondrej Vasik 2008-07-07 10:08:27 UTC
just FYI, solution style "print nothing for unprintable last runlevel result"
was chosen by upstream, so you will get output without "last=" after 6.10-27.fc9
will be pushed to stable. It's different handling than in the case of runlevel
command, but is more accurate (as handling status \0 (not known) as single user
could be misleading).

Comment 11 Fedora Update System 2008-07-09 02:48:17 UTC
coreutils-6.10-27.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.