Welcome to the Linux Foundation Forum!

Command malfunction In slackware ?

chekkizhar
chekkizhar Posts: 182

Hai,

Am using Slackware/Fedora. And in office am using SUSE. In fedora,SUSE, if I give "shutdown -P now" [as root] means the machines are doing shutdown from Xserver as well as from Multi user mode[CLI].

But in Slackware, if I give the same command from Multi user or from Xserver mode, it is giving me the log in prompt, not doing shutdown.

I dont think so, the commands functionality will differ with distros.

And in Slackware , if I press the power button from Xserver, its shutting down, but from Multi user mode, its not sensing the button press.

So, I am switching to Xserver to do proper shutdown.[Since the command, "shutdown -P now" is not working]

So, how can I do proper shutdown from Slackware Multi user mode.

Comments

  • marc
    marc Posts: 647
    Halt or poweroff

    Anyway... you can be in "multi-user" mode and be in X at the same time. That's not related in any way.

    Regards
  • chekkizhar
    chekkizhar Posts: 182
    marc wrote:
    Halt or poweroff

    thank you marc :-)
    Anyway... you can be in "multi-user" mode and be in X at the same time. That's not related in any way.
    thats ok. The thing is, why the linux command is not working ? I cant able to figure out.
    Regards
  • chekkizhar
    chekkizhar Posts: 182
    well actually I expected more answers...can any one tell the reason for the command behavior ?
  • mfillpot
    mfillpot Posts: 2,177
    "shutdown -P halt" in both runlevels 3 and 4 is just pushing me to init 1 (single user mode).

    After reviewing the source for the shutdown program I found that it is written to change the system to runlevel1 and not halt the system. If you wish to actually shutdown the system you can use "shutdown -h now" or poweroff.
  • chekkizhar
    chekkizhar Posts: 182
    mfillpot wrote:
    "shutdown -P halt" in both runlevels 3 and 4 is just pushing me to init 1 (single user mode).

    After reviewing the source for the shutdown program I found that it is written to change the system to runlevel1 and not halt the system. If you wish to actually shutdown the system you can use "shutdown -h now" or poweroff.

    but matt, why they changed the command's way of working too?. It is supposed to be common with all distro, right ?
  • marc
    marc Posts: 647
    linustorvalds wrote:
    mfillpot wrote:
    "shutdown -P halt" in both runlevels 3 and 4 is just pushing me to init 1 (single user mode).

    After reviewing the source for the shutdown program I found that it is written to change the system to runlevel1 and not halt the system. If you wish to actually shutdown the system you can use "shutdown -h now" or poweroff.

    but matt, why they changed the command's way of working too?. It is supposed to be common with all distro, right ?

    In one plain word: no

    That's the beauty of opensource: you can change as many things as you like the way you like :)

    You've hit one of the things that make Slackware a different distro, that's all :)

    Regards
  • mfillpot
    mfillpot Posts: 2,177
    linustorvalds wrote:
    mfillpot wrote:
    "shutdown -P halt" in both runlevels 3 and 4 is just pushing me to init 1 (single user mode).

    After reviewing the source for the shutdown program I found that it is written to change the system to runlevel1 and not halt the system. If you wish to actually shutdown the system you can use "shutdown -h now" or poweroff.

    but matt, why they changed the command's way of working too?. It is supposed to be common with all distro, right ?
    Actually they did not change the command, the source I reviewed is the official source of sysvinit. It may be that the other distros changed It themselves to fix the command.

    The code for sysvinit and shutdown are quite simple you can always modify the code yourself to make it behave as you want and build a custom package.
  • chekkizhar
    chekkizhar Posts: 182
    mfillpot wrote:
    linustorvalds wrote:
    mfillpot wrote:
    "shutdown -P halt" in both runlevels 3 and 4 is just pushing me to init 1 (single user mode).

    After reviewing the source for the shutdown program I found that it is written to change the system to runlevel1 and not halt the system. If you wish to actually shutdown the system you can use "shutdown -h now" or poweroff.

    but matt, why they changed the command's way of working too?. It is supposed to be common with all distro, right ?
    Actually they did not change the command, the source I reviewed is the official source of sysvinit. It may be that the other distros changed It themselves to fix the command.

    The code for sysvinit and shutdown are quite simple you can always modify the code yourself to make it behave as you want and build a custom package.

    ok. thankyou matt
  • chekkizhar
    chekkizhar Posts: 182
    mmmm...ok

Categories

Upcoming Training