Description: Improved systemd detection for password prompt Author: Martin Pitt Bug-Debian: http://bugs.debian.org/747265 Bug: https://community.openvpn.net/openvpn/ticket/274 Origin: upstream, https://community.openvpn.net/openvpn/attachment/ticket/274/0001-Update-systemd-check-to-current-upstream-version.patch Index: openvpn/src/openvpn/console.c =================================================================== --- openvpn.orig/src/openvpn/console.c 2012-11-05 16:29:30.000000000 +0100 +++ openvpn/src/openvpn/console.c 2014-05-14 13:00:24.253185771 +0200 @@ -145,13 +145,8 @@ { struct stat a, b; - /* We simply test whether the systemd cgroup hierarchy is - * mounted */ - - return (lstat("/sys/fs/cgroup", &a) == 0) - && (lstat("/sys/fs/cgroup/systemd", &b) == 0) - && (a.st_dev != b.st_dev); - + /* mirror what upstream sd_booted() does */ + return (access("/run/systemd/system", F_OK) >= 0); } static bool