On Sat, 29.12.12 13:40, Manuel Reimer (manuel.s...@nurfuerspam.de) wrote: > Hello, > > I need a reliable way to find out if a system, where my software > runs on, uses systemd. > > My first thought: > > $ cat /proc/1/comm > systemd
This won't always work as on many systems systemd is invoked via the /sbin/init symlink in which case "comm" might be "init". > Is this a reliable way that will also work in the next few releases > of systemd, or should I use something different? As mentioned, use "mountpoint -q /sys/fs/cgroup/systemd" in the shell and "sd_booted()" in C (the latter does exactly the same thing internally as the former). Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel