You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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* ]]
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.
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: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.The text was updated successfully, but these errors were encountered: