| Summary: | kdmrc has as default "/sbin/shutdown -p now" which sysvinit 2.88 don't know | ||
|---|---|---|---|
| Product: | [Unmaintained] kdm | Reporter: | Phil Miller <philm> | 
| Component: | general | Assignee: | kdm bugs tracker <kdm-bugs-null> | 
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | antkoul, daniele.cocca, edgue, m.debruijne, pawlerson, woebbeking | 
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Chakra | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 4.6.3 | |
| Sentry Crash Report: | |||
| Attachments: | Fix shutdown issue in Linux | ||
| I forgot to add that you will land in tty1 with /sbin/shutdown -p now Is there a command that works both on Linux as well as FreeBSD (see bug 250989)? 'shutdown -h now' should work on both linux and freebsd IIRC, "shutdown -P -h now" should work on BSD too. Well it is a little trickier than that. Here the manual of shutdown on freebsd: http://www.freebsd.org/cgi/man.cgi?query=shutdown&sektion=8 They have no capital P and it seems they need -p to power it down. Only -h won't do it ... or am I wrong? What about "halt -p"? That seems to exist on both platforms. On my Debian Sid it's in /sbin. Is it the same location on freebsd? The same problem here. Solved by "shutdown -P -h now". Btw. you have much bigger user base on Linux than on freebsd, so why Linux users have to suffer from this? *** This bug has been confirmed by popular vote. *** Can somebody point me to the setting where this gets defined: kdebase/workspace/kdm/kcm/kdm-shut.cpp: shutdown_lined->setUrl(KUrl(HALT_CMD)); Created attachment 58711 [details]
Fix shutdown issue in LinuxGit commit 4b7ec7c9966df0c705bc0c9b9bff1010475347b6 by Oswald Buddenhagen. Committed on 08/04/2011 at 19:02. Pushed by ossi into branch 'KDE/4.6'. linux shutdown wants -P instead of -p BUG: 270228 FIXED-IN: 4.6.3 M +4 -1 kdm/config.def http://commits.kde.org/kde-workspace/4b7ec7c9966df0c705bc0c9b9bff1010475347b6 I have to re-open this. shutdown -P now does nothing:
[phil@chakra-desktop buildroot]$ sudo shutdown -P now
shutdown: -H and -P flags can only be used along with -h flag.
Usage:    shutdown [-akrhPHfFnc] [-t sec] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **
Either you change it to /sbin/shutdown -P -h now or as it was to /sbin/halt or /sbin/shutdown -h now.oh, so this is just a modifier and not an actual command. that explains the difference to the BSD syntax. Git commit 28b79d8d04cce4d0a0899cadcc8fe6fd69d38e01 by Oswald Buddenhagen. Committed on 08/04/2011 at 20:58. Pushed by ossi into branch 'KDE/4.6'. actually, it wants -h -P, because -P is just a modifier FAIL ... BUG: 270228 (take 2) M +1 -1 kdm/config.def http://commits.kde.org/kde-workspace/28b79d8d04cce4d0a0899cadcc8fe6fd69d38e01 *** Bug 270432 has been marked as a duplicate of this bug. *** | 
Version: unspecified (using KDE 4.6.2) OS: Linux sysvinit 2.88 don't recongize "/sbin/shutdown -p now" which is the default now with 4.6.2. Proper settings would be: [Shutdown] # The command (subject to word splitting) to run to halt the system. # Default is "/sbin/halt" #HaltCmd= Or: [Shutdown] # The command (subject to word splitting) to run to halt the system. # Default is "/sbin/shutdown -h now" #HaltCmd= Here the list of all the switches shutdown has atm:[phil@chakra-desktop buildroot]$ shutdown --help shutdown: you must be root to do that! Usage: shutdown [-akrhPHfFnc] [-t sec] time [warning message] -a: use /etc/shutdown.allow -k: don't really shutdown, only warn. -r: reboot after shutdown. -h: halt after shutdown. -P: halt action is to turn off power. -H: halt action is to just halt. -f: do a 'fast' reboot (skip fsck). -F: Force fsck on reboot. -n: do not go through "init" but go down real fast. -c: cancel a running shutdown. -t secs: delay between warning and kill signal. ** the "time" argument is mandatory! (try "now") ** Reproducible: Always Steps to Reproduce: try to call "/sbin/shutdown -p now" Actual Results: you will get: shutdown: invalid option -- 'p' Expected Results: Computer should shutdown