Posts: 156
caprea
Joined: 08 Jan 2014
#1
Since dist-upgrade last week the PC cant shut-down any more by using the red button.I can hear that the HD is clicked out,
but then the monitor and the PC stays on.
I think this is caused by systemd.
To reboot is still working.
With the command

Code: Select all

systemctl poweroff
a complete shut-down takes place
Is there a possibility to let the red button just do this command?
Last edited by caprea on 16 Jul 2014, 05:43, edited 1 time in total.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
The file you want to edit is in /usr/local/bin.
I am not on my antiX box to get the exact name of the file.

Make a backup 1st of the .sh file before making any changes.
It will be named something exit.sh.
Posts: 156
caprea
Joined: 08 Jan 2014
#3
Thank you,Roky.
Found it and worked.Changed in the latest rows the"halt" to"poweroff"
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#4
caprea wrote:Thank you,Roky.
Found it and worked.Changed in the latest rows the"halt" to"poweroff"
Glad you got it solved. Can you take a little time out to explain exactly what you edited and how for other users running into this?
Posts: 156
caprea
Joined: 08 Jan 2014
#5
Sure I can.
Like you said the little red button sits in /usr/local/bin.The file is called exitantix.sh.
These are the last lines inthe file:

Code: Select all

if ["$EXIT" ="shutdown_antix" ] ; then
    if which persist-config &> /dev/null; then
        sudo persist-config --shutdown --command halt
    else
        sudo halt
    fi
fi

I changed them by editing as root to this:

Code: Select all

if ["$EXIT" ="shutdown_antix" ] ; then
    if which persist-config &> /dev/null; then
        sudo persist-config --shutdown --command poweroff
    else
        sudo poweroff
    fi
fi

Posts: 173
DeepDayze
Joined: 09 Sep 2011
#6
That works, caprea. As my system now has systemd changing the"halt" to"poweroff" was needed in order for systemd to power the system fully off as it does not recognize the halt option to shutdown.