reboot/poweroff/halt not working
#1
Tue, 2017-11-14 17:21
yaron
-
- Offline
- 2 months 4 weeks ago
- 2017-10-31
I'm not sure what's wrong nor where are the relevant logs to these commands (if any), can you guys give me a hint?
I managed to use poweroff -f
and reboot -f
yet I'm not sure this is the best approach for my system.
Furthermore, I think it happened after I've added start and stop scripts to /etc/local.d
and ran rc-update add local default
.
Thanks in advance!
One way is to add a line in the/etc/sudoers file for users with admin rights (for a user to be given admin rights, open a root terminal and do
adduser myusername wheel
; while doing visudo as root as in next step, uncomment the line "# %wheel ALL=(ALL) ALL" also, and your user will have sudo rights when next logged in). Use visudo to make sure that you do this correctly:If not in a root terminal use:
sudo visudo
or if a root terminal, use
visudo
Then scroll down to the following paragraph
...and then add the following (type 'i' to insert)
Visudo uses vi text editor, I think, so you need to save the document with Esc and type :x
Then you can modify the shortcuts on your desktop for 'Shutdown', etc. to say
sudo shutdown
, etc. and you won't be asked for a password.This may not be recommended for servers, etc. - I don't know about them - and maybe there are better ways; I'm not familiar with any polkit on Alpine Linux.
For the logs, try /var/log/messages & /var/log/dmesg
It may be helpful to see the actual scripts that you have added to /etc/local.d/ (or links to them if they are lengthy).
Have you tried
rc-update del local default
to see if that reverts the system to the expected behaviour?