public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] how to tell you are using systemd?
@ 2013-08-01  2:25 covici
  2013-08-01  2:39 ` Wang Xuerui
  0 siblings, 1 reply; 4+ messages in thread
From: covici @ 2013-08-01  2:25 UTC (permalink / raw
  To: gentoo-user

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.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] how to tell you are using systemd?
  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
  2013-08-01  9:06   ` covici
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Xuerui @ 2013-08-01  2:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

在 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...

[-- Attachment #2: Type: text/html, Size: 399 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] how to tell you are using systemd?
  2013-08-01  2:39 ` Wang Xuerui
@ 2013-08-01  3:11   ` Canek Peláez Valdés
  2013-08-01  9:06   ` covici
  1 sibling, 0 replies; 4+ messages in thread
From: Canek Peláez Valdés @ 2013-08-01  3:11 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] how to tell you are using systemd?
  2013-08-01  2:39 ` Wang Xuerui
  2013-08-01  3:11   ` Canek Peláez Valdés
@ 2013-08-01  9:06   ` covici
  1 sibling, 0 replies; 4+ messages in thread
From: covici @ 2013-08-01  9:06 UTC (permalink / raw
  To: gentoo-user

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...

OK, thanks.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-01  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-08-01  9:06   ` covici

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox