Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58839 - halt -w &>/dev/null reboots my system
Summary: halt -w &>/dev/null reboots my system
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-29 16:00 UTC by MasterX
Modified: 2005-11-27 10:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MasterX 2004-07-29 16:00:46 UTC
Hi,
I felt compelled to open a bug for those who might in the near future have the same problem with me. Everytime I was issuing the command reboot or shutdown, the system will kill all the running processes, then it will Deactivate swap, and then it halts the system, without unmounting the filesystems.
I asked people on the forum, I asked friends I even went to the gentoo channel on irc, but nobody could help me. All the files, scripts look normal.

Then, today, I carefully studied the halt.sh script. And I found out that between commands Deactivating Swap and unmounting filesystems is
halt -w &>/dev/null

To test, I run halt -w, and I got the result I was getting so far. So I commented this line out and now my system reboots/poweroffs fine.
Apparently this command, reboots or halts the system, in contrast to what the manual says.

I do not know why this command does not work anymore. Maybe, you do.
I have baselayout 1.10.1  emerged

Thank you
Comment 1 SpanKY gentoo-dev 2004-07-29 16:04:48 UTC
related to Bug 57766 perhaps ?
Comment 2 MasterX 2004-07-29 17:01:10 UTC
Not exactly.
The last message that I see is
"Umounting filesystems"
the previous message is
"System is halted".
I am forced to press alt+ctrl+del to reboot the system or to press the power button. Because, the filesystems were not umounted, when the system boots, I see the message "Recovering Journal"
Comment 3 MasterX 2004-07-29 20:15:00 UTC
There is something that I want to make clear. This problem appeared suddenly. When I first installed Gentoo, a year ago, everything was working fine. But, a couple of months ago, I started having this problem. I remember that once I updated baselayout, but reverting to an old version did not fix it.
Comment 4 SpanKY gentoo-dev 2004-10-31 01:44:16 UTC
does an error show up if you change it to run just 'halt -w' ?
Comment 5 MasterX 2004-10-31 16:41:08 UTC
Well halt -w powered off the system !!
Comment 6 SpanKY gentoo-dev 2004-10-31 17:01:01 UTC
umm, so if you remove the ' &>/dev/null' it halts just fine, but if you add it back in, it doesnt ?
Comment 7 MasterX 2004-10-31 19:54:41 UTC
Actually, 
halt -w &>/dev/null is also powering off the system. Which should not, right?
I forgot to say that a couple of days ago I updated the baselayout. The installed version is 1.9.4-r6. 
Comment 8 SpanKY gentoo-dev 2004-10-31 20:03:50 UTC
so in other words, everything works now ? :)
Comment 9 MasterX 2004-10-31 20:14:41 UTC
If you do not mind that you want to reboot the system, but it will power off, then I guess everything is fine. Nevertheless, I have is commented out the above line in the halt.sh file.
Comment 10 SpanKY gentoo-dev 2004-12-01 07:58:31 UTC
ok, i made a lot of dumb comments without doing some research before hand ...

'halt -w' should only write to /var/log/wtmp and that's it ... looking at the man page and the source code of halt.c confirms this

if 'halt -w' does anything (like make your system power off), that's a problem with sysvinit's halt and not with the init scripts

can you try upgrading to baselayout-1.11.6 ?  you neglected to post `emerge info` like you should of so i dont know what kind of gcc/CFLAGS you're using here ...
Comment 11 MasterX 2004-12-01 09:04:45 UTC
I reply to the email I got. So I send an email to  
bugzilla-daemon@gentoo.org with subject 
[Bug 58839] halt -w &>/dev/null reboots my system.

With this email appear in this thread?
Comment 12 SpanKY gentoo-dev 2004-12-01 10:07:32 UTC
bugzilla sends e-mails only as a courtesy ... replying to them does nothing
Comment 13 SpanKY gentoo-dev 2005-11-27 10:17:40 UTC
try with sysvinit 2.86-r3