|
Bugzilla – Full Text Bug Listing |
| Summary: | ctrl-alt-delete in runlevel 3 causes a reboot although shutdown is configured in yast | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Forgotten User SNh8s-Gz29 <forgotten_SNh8s-Gz29> |
| Component: | YaST2 | Assignee: | Jiří Suchomel <jsuchome> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | fcrozat |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | x86 | ||
| OS: | SUSE Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
patch for /usr/share/YaST2/modules/Security.ycp
patch for /usr/share/YaST2/modules/Security.ycp |
||
Hmm, I suppose you are using systemd? (In reply to comment #1) > Hmm, I suppose you are using systemd? Yes. And before you ask, if I boot with option "init=/sbin/sysvinit" the behaviour is correct: Press ctrl-alt-delete and the system shuts down and powers off. (64-bit and 32-bit) OK, it is not a kernel bug then... yast should create : ln -s /lib/systemd/system/halt.service /etc/systemd/system/ctrl-alt-del.target in addition to changing /etc/inittab (which is not read by systemd). If I add (while systemd is configured)
> ln -s /lib/systemd/system/halt.service /etc/systemd/system/ctrl-alt-del.target
manually, ctrl-alt-delete doesn't do anything at all. After I remove that link, I am back to the original behaviour.
(In reply to comment #5) > If I add (while systemd is configured) > > > ln -s /lib/systemd/system/halt.service /etc/systemd/system/ctrl-alt-del.target > > manually, ctrl-alt-delete doesn't do anything at all. After I remove that link, > I am back to the original behaviour. Frederic, any comment on this? Additionally, what about other options? YaST offers Reboot, Halt and Ignore. I suppose for Reboot, the symlink above should be removed, but what about Ignore? by default, ctrl-alt-del.target is symlinked to reboot.target so, yast should do (careful, I did an error in my previous comment, better to link against target, not service): for reboot : ln -s /lib/systemd/system/halt.target /etc/systemd/system/ctrl-alt-del.target for halt : remove /etc/systemd/system/ctrl-alt-del.target (so it will use the defaults) for ignore : ln -s /dev/null /etc/systemd/system/ctrl-alt-del.target (In reply to comment #7) > by default, ctrl-alt-del.target is symlinked to reboot.target > for reboot : ln -s /lib/systemd/system/halt.target > /etc/systemd/system/ctrl-alt-del.target > for halt : remove /etc/systemd/system/ctrl-alt-del.target (so it will use the > defaults) > for ignore : ln -s /dev/null /etc/systemd/system/ctrl-alt-del.target It should be the other way, right? for reboot: ln -s /lib/systemd/system/reboot.target /etc/systemd/system/ctrl-alt-del.target for halt: ln -s /lib/systemd/system/halt.target /etc/systemd/system/ctrl-alt-del.target oops, not enough coffee this morning : for reboot : just remove the symlink in /etc (so we revert to package behaviour) for halt: ln -s /lib/systemd/system/halt.target /etc/systemd/system/ctrl-alt-del.target for nothing ln -s /dev/null /etc/systemd/system/ctrl-alt-del.target Just in case: if someone had, theoreticaly, /etc/systemd/system/ctrl-alt-del.target linked to /lib/systemd/system/reboot.target or /lib/systemd/system/ctrl-alt-del.target This also counts as reboot (the default scenario), right? yes, it does. targets and services from /etc/systemd/system are always preponderant over the one from /lib/systemd/system Created attachment 476442 [details]
patch for /usr/share/YaST2/modules/Security.ycp
Harald, could you patch your /usr/share/YaST2/modules/Security.ycp with this patch and test if it works for you?
1. download it to file ('security.diff')
2. patch it ('patch /usr/share/YaST2/modules/Security.ycp < security.diff')
3. compile ('ycpc -c /usr/share/YaST2/modules/Security.ycp')
4. run YaST again
After applying the patch and setting "Interpretation of Ctrl-Alt-Delete" to "halt" the system indeed *halts* and prints a message to that effect, but does *not* power off, which is what I would expect Well, that looks like a systemd bug (actually, it happens to me sometimes as well) Jiri, for me there is no "sometimes" about it. I didn't try it hundreds of times, but with the patch in place it *always* halts without power off. When using sysvinit it *always* powers off (In reply to comment #15) > Jiri, for me there is no "sometimes" about it. I didn't try it hundreds of > times, but with the patch in place it *always* halts without power off. When > using sysvinit it *always* powers off Yes, I believe. I wrote 'sometimes' for me, just when I try to halt the system (unrelated to pressing ctrl-alt-delete). my bad, for "halt" command, create symlink : ln -s /lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target for halt not powering off, be sure to use halt -p, just calling halt will not cut the power (it is standard unix behaviour, we had a patch in sysvinit initscript to add -p on supported platform but we don't plan to add similar stuff to systemd). Created attachment 476641 [details]
patch for /usr/share/YaST2/modules/Security.ycp
New patch
Harald, does it work now? Jiri, I have tried the "halt" setting in YaST under both 32-bit and 64-bit systems and both now successfully power off! I didn't try the other YaST options "reboot" and "ignore" This is an autogenerated message for OBS integration: This bug (742783) was mentioned in https://build.opensuse.org/request/show/105924 Factory / yast2-security I've submitted new package to Factory and requested update for 12.1
> created request id 105926
This is an autogenerated message for OBS integration: This bug (742783) was mentioned in https://build.opensuse.org/request/show/105926 12.1 / yast2-security |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.25) Gecko/20111216 SUSE/3.6.25-2.1 Firefox/3.6.25 I usually shutdown the system from runlevel 3 using the Control-Alt-Delete combination. In Yast -> Security and Users -> Security Centre and Hardening -> Boot Settings -> Interpretation of Ctrl-Alt-Delete I selected "halt". In /etc/inittab I found > # what to do when CTRL-ALT-DEL is pressed > ca::ctrlaltdel:/sbin/shutdown -h -t 4 now Pressing Ctrl-Alt-Del in runlevel 3 causes a reboot Entering "shutdown -h -t 4 now" causes a system halt including power-off I observed this on a 64-bit and a 32-bit installation Reproducible: Always Steps to Reproduce: 1.Boot up 2.Press Ctrl-Alt-Delete Actual Results: System reboots Expected Results: System to shutdown and power off