On 12 April 2013 15:43, Martin Jansa <[email protected]> wrote:
> I have noticed this when testing upgrade paths, but general-purpose
> abstraction will became quite complicated in images which have both
> sysvinit and systemd scripts (I guess that checking which init is
> running will be needed to decide if /etc/init.d/foo or systemctl should be
> called :/).

Something along the lines of

  if which systemctl && test -d /run/systemd/system

should do the job.  Checking that directory exists is how
libsystemd-daemon determines if systemd is active or not, so if it's
good enough for them it's good enough for us.

Ross

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to