<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>270228</bug_id>
          
          <creation_ts>2011-04-06 17:18:34 +0000</creation_ts>
          <short_desc>kdmrc has as default &quot;/sbin/shutdown -p now&quot; which sysvinit 2.88 don&apos;t know</short_desc>
          <delta_ts>2011-04-09 20:26:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kdm</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Chakra</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Phil Miller">philm</reporter>
          <assigned_to name="kdm bugs tracker">kdm-bugs-null</assigned_to>
          <cc>antkoul</cc>
    
    <cc>daniele.cocca</cc>
    
    <cc>edgue</cc>
    
    <cc>m.debruijne</cc>
    
    <cc>pawlerson</cc>
    
    <cc>woebbeking</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin>4.6.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>80</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1104705</commentid>
    <comment_count>0</comment_count>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-06 17:18:34 +0000</bug_when>
    <thetext>Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

sysvinit 2.88 don&apos;t recongize &quot;/sbin/shutdown -p now&quot; 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 &quot;/sbin/halt&quot;
#HaltCmd=

Or:

[Shutdown]
# The command (subject to word splitting) to run to halt the system.
# Default is &quot;/sbin/shutdown -h now&quot;
#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&apos;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 &apos;fast&apos; reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through &quot;init&quot; but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the &quot;time&quot; argument is mandatory! (try &quot;now&quot;) **


Reproducible: Always

Steps to Reproduce:
try to call &quot;/sbin/shutdown -p now&quot; 

Actual Results:  
you will get: shutdown: invalid option -- &apos;p&apos;

Expected Results:  
Computer should shutdown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104712</commentid>
    <comment_count>1</comment_count>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-06 17:35:44 +0000</bug_when>
    <thetext>I forgot to add that you will land in tty1 with /sbin/shutdown -p now</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104724</commentid>
    <comment_count>2</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2011-04-06 18:19:44 +0000</bug_when>
    <thetext>Is there a command that works both on Linux as well as FreeBSD (see bug 250989)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104793</commentid>
    <comment_count>3</comment_count>
    <who name="Antonis K">antkoul</who>
    <bug_when>2011-04-06 21:34:24 +0000</bug_when>
    <thetext>&apos;shutdown -h now&apos; should work on both linux and freebsd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104848</commentid>
    <comment_count>4</comment_count>
    <who name="Daniele Cocca">daniele.cocca</who>
    <bug_when>2011-04-07 00:56:31 +0000</bug_when>
    <thetext>IIRC, &quot;shutdown -P -h now&quot; should work on BSD too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104857</commentid>
    <comment_count>5</comment_count>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-07 02:52:29 +0000</bug_when>
    <thetext>Well it is a little trickier than that. Here the manual of shutdown on freebsd:

http://www.freebsd.org/cgi/man.cgi?query=shutdown&amp;sektion=8

They have no capital P and it seems they need -p to power it down. Only -h won&apos;t do it ... or am I wrong?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105179</commentid>
    <comment_count>6</comment_count>
    <who name="Andre Woebbeking">woebbeking</who>
    <bug_when>2011-04-07 18:43:29 +0000</bug_when>
    <thetext>What about &quot;halt -p&quot;? That seems to exist on both platforms. On my Debian Sid it&apos;s in /sbin. Is it the same location on freebsd?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105292</commentid>
    <comment_count>7</comment_count>
    <who name="Paweł">pawlerson</who>
    <bug_when>2011-04-07 23:19:47 +0000</bug_when>
    <thetext>The same problem here. Solved by &quot;shutdown -P -h now&quot;. Btw. you have much bigger user base on Linux than on freebsd, so why Linux users have to suffer from this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105377</commentid>
    <comment_count>8</comment_count>
    <who name="Michiel de Bruijne">m.debruijne</who>
    <bug_when>2011-04-08 03:11:09 +0000</bug_when>
    <thetext>*** This bug has been confirmed by popular vote. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105562</commentid>
    <comment_count>9</comment_count>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-08 15:20:42 +0000</bug_when>
    <thetext>Can somebody point me to the setting where this gets defined:

kdebase/workspace/kdm/kcm/kdm-shut.cpp:
shutdown_lined-&gt;setUrl(KUrl(HALT_CMD));</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105573</commentid>
    <comment_count>10</comment_count>
      <attachid>58711</attachid>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-08 15:40:50 +0000</bug_when>
    <thetext>Created attachment 58711
Fix shutdown issue in Linux</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105665</commentid>
    <comment_count>11</comment_count>
    <who name="Oswald Buddenhagen">ossi</who>
    <bug_when>2011-04-08 19:00:52 +0000</bug_when>
    <thetext>Git commit 4b7ec7c9966df0c705bc0c9b9bff1010475347b6 by Oswald Buddenhagen.
Committed on 08/04/2011 at 19:02.
Pushed by ossi into branch &apos;KDE/4.6&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105706</commentid>
    <comment_count>12</comment_count>
    <who name="Phil Miller">philm</who>
    <bug_when>2011-04-08 20:24:54 +0000</bug_when>
    <thetext>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&apos;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 &apos;fast&apos; reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through &quot;init&quot; but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the &quot;time&quot; argument is mandatory! (try &quot;now&quot;) **

Either you change it to /sbin/shutdown -P -h now or as it was to /sbin/halt or /sbin/shutdown -h now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105718</commentid>
    <comment_count>13</comment_count>
    <who name="Oswald Buddenhagen">ossi</who>
    <bug_when>2011-04-08 20:48:42 +0000</bug_when>
    <thetext>oh, so this is just a modifier and not an actual command. that explains the difference to the BSD syntax.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1105722</commentid>
    <comment_count>14</comment_count>
    <who name="Oswald Buddenhagen">ossi</who>
    <bug_when>2011-04-08 20:54:44 +0000</bug_when>
    <thetext>Git commit 28b79d8d04cce4d0a0899cadcc8fe6fd69d38e01 by Oswald Buddenhagen.
Committed on 08/04/2011 at 20:58.
Pushed by ossi into branch &apos;KDE/4.6&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1106018</commentid>
    <comment_count>15</comment_count>
    <who name="Lamarque V. Souza">lamarque</who>
    <bug_when>2011-04-09 20:26:39 +0000</bug_when>
    <thetext>*** Bug 270432 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>58711</attachid>
            <date>2011-04-08 15:40:50 +0000</date>
            <delta_ts>2011-04-08 15:40:50 +0000</delta_ts>
            <desc>Fix shutdown issue in Linux</desc>
            <filename>shutdown-fix.patch</filename>
            <type>application/octet-stream</type>
            <size>505</size>
            <attacher name="Phil Miller">philm</attacher>
            
              <data encoding="base64">LS0tIGtkZWJhc2Utd29ya3NwYWNlLTQuNi4yL2tkbS9jb25maWcuZGVmfgkyMDExLTA0LTA4IDAw
OjI5OjQ4LjI5MTk0MTE1NCAtMDcwMAorKysga2RlYmFzZS13b3Jrc3BhY2UtNC42LjIva2RtL2Nv
bmZpZy5kZWYJMjAxMS0wNC0wOCAwMDozMjowNC43Mzg2MDc2MTkgLTA3MDAKQEAgLTM4LDcgKzM4
LDcgQEAKICMgZGVmaW5lIEhBTFRfQ01ECSIvdXNyL3NiaW4vc2h1dGRvd24gLWggbm93IgogIyBk
ZWZpbmUgUkVCT09UX0NNRAkiL3Vzci9zYmluL3NodXRkb3duIC1yIG5vdyIKICNlbGlmIGRlZmlu
ZWQoQlNEKSB8fCBkZWZpbmVkKF9fbGludXhfXykKLSMgZGVmaW5lIEhBTFRfQ01ECSIvc2Jpbi9z
aHV0ZG93biAtcCBub3ciCisjIGRlZmluZSBIQUxUX0NNRAkiL3NiaW4vc2h1dGRvd24gLWggbm93
IgogIyBkZWZpbmUgUkVCT09UX0NNRAkiL3NiaW4vc2h1dGRvd24gLXIgbm93IgogI2VsaWYgZGVm
aW5lZChfX1NWUjQpCiAjIGRlZmluZSBIQUxUX0NNRAkiL3Vzci9zYmluL2hhbHQiCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>