[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: migrating to Debian gitlab



On 02/11/2016 09:36 PM, Adam Borowski wrote:
> On Thu, Feb 11, 2016 at 11:59:09PM +0530, Pirate Praveen wrote:
>> Checking /proc/cmdline was working in my test machine as I had systemd before it became the default.
>>
>> I think checking /proc/1/cmdline will be a better method of checking systemd.
> 
> /proc/1/cmdline will be wrong in chroots if the chroot doesn't use systemd
> but the host system does.  You want to check /run/systemd instead.

Actually, you want to check that /run/systemd/system is a directory,
because that is the official way upstream says one should check for
PID 1 being systemd, and it is also what sd_booted() from
libsystemd0 does, see

  http://man7.org/linux/man-pages/man3/sd_booted.3.html

Regards,
Christian

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: