diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-11-22 11:23:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-27 22:54:59 +0000 |
commit | 0769ff28dbd9690481a4d21e796a3d4e32050cac (patch) | |
tree | 64a84ac74ef7ec64ef833b57e1b9ada1c561fc38 /meta/recipes-core | |
parent | e59dcbc11490b5a69f5c79dbcbfa07f3080432a2 (diff) | |
download | poky-0769ff28dbd9690481a4d21e796a3d4e32050cac.tar.gz |
systemd-compat-units.bb: fix postinstall script
This fixes an issue running "opkg upgrade" on a system with systemd
(and when there is an update to "systemd-compat-units",
for example between yocto 4.2.2 and 4.2.3):
//var/lib/opkg/info/systemd-compat-units.postinst: cd: line 3: can't cd to /etc/init.d: No such file or directory
The existence of /etc/init.d is now tested
without causing an error if doesn't exist.
Fixes [YOCTO #15292]
(From OE-Core rev: 0330331a1386fd2a34b410a7f62b29bfc8dc23c4)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd-compat-units.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb index 253bc9fcf1..c03d97f9c9 100644 --- a/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/meta/recipes-core/systemd/systemd-compat-units.bb | |||
@@ -27,7 +27,8 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \ | |||
27 | 27 | ||
28 | pkg_postinst:${PN} () { | 28 | pkg_postinst:${PN} () { |
29 | 29 | ||
30 | cd $D${sysconfdir}/init.d || exit 0 | 30 | test -d $D${sysconfdir}/init.d || exit 0 |
31 | cd $D${sysconfdir}/init.d | ||
31 | 32 | ||
32 | echo "Disabling the following sysv scripts: " | 33 | echo "Disabling the following sysv scripts: " |
33 | 34 | ||