Bug 453249 - who -r command do not report last runlevel
who -r command do not report last runlevel
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-28 07:07 EDT by Gian Piero De Lolliis
Modified: 2008-07-08 22:48 EDT (History)
1 user (show)

See Also:
Fixed In Version: 6.10-27.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-08 22:48:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Gian Piero De Lolliis 2008-06-28 07:07:58 EDT
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 03:38:38 EDT
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 09:56:38 EDT
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 14:25:30 EDT
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 02:06:52 EDT
Sorry for misunderstanting, the output of runlevel command is:

[root@feedo ~]# runlevel
N 3

Kind regards,
MT
Comment 5 Ondrej Vasik 2008-07-01 06:08:11 EDT
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 09:18:10 EDT
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 10:38:03 EDT
(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 10:52:12 EDT
(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 05:59:09 EDT
coreutils-6.10-27.fc9 has been submitted as an update for Fedora 9
Comment 10 Ondrej Vasik 2008-07-07 06:08:27 EDT
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-08 22:48:17 EDT
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.