public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Canek Peláez Valdés" <caneko@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] how to tell you are using systemd?
Date: Wed, 31 Jul 2013 22:11:41 -0500	[thread overview]
Message-ID: <CADPrc80m8qih3dykiEgELHJKHVPBakLo3hRn6f5n7f1+seQtow@mail.gmail.com> (raw)
In-Reply-To: <CABK5mSY1FVnSfdb72DsD-5BZHDzvEpzTw22GVnCmuY8wYcyt5w@mail.gmail.com>

On Wed, Jul 31, 2013 at 9:39 PM, Wang Xuerui <idontknw.wang@gmail.com> wrote:
> 在 2013-8-1 上午10:26, <covici@ccs.covici.com>写道:
>
>
>>
>> Can a shell script tell if systemd is the init?  I have a couple of
>> places where it would be nice to know this.
>>
>> Thanks in advance for any suggestions.
>
> Check /proc/1/comm or something like that, IIRC...

Yep:

if grep -q systemd /proc/1/comm; then
    echo systemd
else
    echo "not systemd"
fi

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


  reply	other threads:[~2013-08-01  3:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  2:25 [gentoo-user] how to tell you are using systemd? covici
2013-08-01  2:39 ` Wang Xuerui
2013-08-01  3:11   ` Canek Peláez Valdés [this message]
2013-08-01  9:06   ` covici

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADPrc80m8qih3dykiEgELHJKHVPBakLo3hRn6f5n7f1+seQtow@mail.gmail.com \
    --to=caneko@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox