Bug 618678

Summary: powers off instead of reboot
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: andreas.bierfert, jlaska, kevin, lpoetter, metherid, nalin, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-05 17:50:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 611991    
Description Flags
systemctl: ignore "-p" when called as "reboot" none

Description Michal Schmidt 2010-07-27 14:24:25 UTC
Description of problem:
Trying to reboot in any of the usual ways (CTRL+ALT+DEL, init 6, "Restart" from gdm) results in a power-off instead.

It turns out that /etc/init.d/halt passes a "-p" parameter to /sbin/reboot (a symlink to systemctl) and unlike upstart, systemd does not ignore it in this case.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have upstart-sysvinit installed.
2. Run "reboot -f -p". Notice it causes a reboot, "-p" is correctly ignored.
3. Uninstall upstart-sysvinit, install systemd-sysvinit instead.
4. Run "reboot -f -p".
Actual results:
It powers off instead of reboot.

Expected results:
The "-p" parameter should be ignored when systemctl is invoked as "reboot".

Comment 1 James Laska 2010-07-29 17:57:02 UTC
Adding to F14Beta blocker list per the following Beta release criteria (https://fedoraproject.org/wiki/Fedora_14_Beta_Release_Criteria)

  "The desktop's offered mechanisms for shutting down, logging out
   and rebooting must work "

Comment 2 Bug Zapper 2010-07-30 12:53:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:

Comment 3 Michal Schmidt 2010-07-30 15:29:33 UTC
Created attachment 435583 [details]
systemctl: ignore "-p" when called as "reboot"

Comment 4 Michal Schmidt 2010-08-05 11:40:42 UTC
*** Bug 620290 has been marked as a duplicate of this bug. ***

Comment 5 Lennart Poettering 2010-08-05 17:50:09 UTC
Fix merged upstream.

Michal, thanks for the patch! Much appreciated!