Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have systemd (and no sysvinit) installed on a Arch Linux box. However, I cannot shutdown/reboot with consolekit (dbus interface). # systemctl {shutdown,reboot} work just fine, so I guess it's because consolekit doesn't know how to contact the pid 1 process.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

After having a look at the source code, it seems that consolekit(ck) uses a short script to do shutdown and reboot. These two scripts are installed as

/usr/lib/ConsoleKit/scripts/ck-system-{stop,restart}

in Arch Linux and they simply find and exec {,/usr}/sbin/shutdown to do that.

Therefore, there seems no way to configure ck to do that now (by normal I just mean simply edit some file(s) in /etc), and the work around is straightforward.

  1. simply edit those two scripts to exec systemctl {shutdown,reboot}. (But at least on Arch Linux, it will probably be overwrite after each upgrading.)

  2. simply create a wrapper script at /sbin/shutdown that do the right thing. (This will cause conflict if you want to install sysvinit later, but hopefully not a problem.)

I will also look for (and create if there haven't been one) a bug report on the problem and I hope it can be done in a better way in the future (really don't like to do configuration outside /etc).

NOTE: Arch Linux now have the systemd-sysvcompat package which provide these (init/halt/shutdown etc.) as symlink to systemctl/systemd.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.