Skip to contentSkip to conversation

wpa-supplicant postinsts failing without sysvinit in DISTRO_FEATURES

DISCUSSION Martin Jansa 2 participants 5 messages Apr 12, 2013

lore
Share & tools
lore
#0 lore raw

oe-core/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc

defines pkg_postinst_wpa-supplicant
with:

        if [ "x$DBUSPID" != "x" ]; then
                /etc/init.d/dbus-1 reload || true
        fi

and /etc/init.d/dbus-1 is missing without sysvinit in DISTRO_FEATURES

Thanks to "true" it doesn't fail completely, but if the goal is no warnings in images then errors should be fixed too :)

Configuring wpa-supplicant. //var/lib/opkg/info/wpa-supplicant.postinst: line 9: /etc/init.d/dbus-1:
//No such file or directory

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#1 lore raw
Quoted 1 line · Martin Jansa

oe-core/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc

the same is in avahi.inc (pkg_postinst_avahi-daemon)

Quoted 18 lines

defines pkg_postinst_wpa-supplicant
with:

        if [ "x$DBUSPID" != "x" ]; then
                /etc/init.d/dbus-1 reload || true
        fi

and /etc/init.d/dbus-1 is missing without sysvinit in DISTRO_FEATURES

Thanks to "true" it doesn't fail completely, but if the goal is no warnings in images then errors should be fixed too :)

Configuring wpa-supplicant. //var/lib/opkg/info/wpa-supplicant.postinst: line 9: /etc/init.d/dbus-1:
//No such file or directory

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
In reply to Martin Jansa
Quoted 4 lines · Martin Jansa

oe-core/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc

defines pkg_postinst_wpa-supplicant
with:

Quoted 8 lines
        if [ "x$DBUSPID" != "x" ]; then
                /etc/init.d/dbus-1 reload || true
        fi

and /etc/init.d/dbus-1 is missing without sysvinit in DISTRO_FEATURES

Thanks to "true" it doesn't fail completely, but if the goal is no warnings in images then errors should be fixed too :)

We're going to see stuff like this a lot - clearly we need some abstraction over this. One-off for dbus, or a general-purpose small abstraction over invoking systemctl or init scripts?

Ross

#3 lore raw
Quoted 9 lines · Ross
Quoted 8 lines · Martin Jansa

oe-core/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc

defines pkg_postinst_wpa-supplicant
with:

        if [ "x$DBUSPID" != "x" ]; then
                /etc/init.d/dbus-1 reload || true
        fi
Quoted 8 lines
Quoted 4 lines

and /etc/init.d/dbus-1 is missing without sysvinit in DISTRO_FEATURES

Thanks to "true" it doesn't fail completely, but if the goal is no warnings in images then errors should be fixed too :)

We're going to see stuff like this a lot - clearly we need some abstraction over this. One-off for dbus, or a general-purpose small abstraction over invoking systemctl or init scripts?

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 :/).

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 5 lines · Martin Jansa

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