Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd detection does not work on Arch Linux #38

Closed
blueyed opened this issue Nov 24, 2015 · 1 comment
Closed

systemd detection does not work on Arch Linux #38

blueyed opened this issue Nov 24, 2015 · 1 comment

Comments

@blueyed
Copy link
Contributor

blueyed commented Nov 24, 2015

I have noticed that HAVE_SYSTEMD=$(shell grep -q systemd /proc/1/cmdline && echo "y") from the Makefile does not work on Arch Linux, where it contains /sbin/init, which then is a symlink:

/sbin/init -> ../lib/systemd/systemd*

The following would work:
[[ $(readlink -f $(cat /proc/1/cmdline)) == *systemd* ]]

A better method (from http://unix.stackexchange.com/a/164092/1920) might be [[systemctl=~ -\.mount ]] or something similar though.

@phillipberndt
Copy link
Owner

IMO, your solution is the cleaner one. AFAIK, =~ is bash specific. Also, it is not clear to me what systemctl would output if systemd was not actually in use? For now, I'll apply your fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants