[oe-commits] Martin Jansa : systemctl: Don't try to remove directory which doesn' t exist
git at git.openembedded.org
git at git.openembedded.org
Fri Mar 20 11:10:04 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 0332e19098d7d3d623a04098b43e3b2482af1a17
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0332e19098d7d3d623a04098b43e3b2482af1a17
Author: Martin Jansa <martin.jansa at gmail.com>
Date: Fri Mar 13 19:41:40 2015 +0100
systemctl: Don't try to remove directory which doesn't exist
Noticed in this log.do_rootfs error:
Started /OE/build/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/bin/systemctl --root=/OE/build/shr-core/tmp-glibc/work/nokia900-oe-linux-gnueabi/shr-image/2.0-r20/rootfs disable bluetooth.service
Try to find location of bluetooth.service...
Found bluetooth.service in /lib/systemd/system/bluetooth.service
WantedBy=bluetooth.target found in bluetooth.service
rmdir: failed to remove '/OE/build/shr-core/tmp-glibc/work/nokia900-oe-linux-gnueabi/shr-image/2.0-r20/rootfs/etc/systemd/system/bluetooth.target.wants': No such file or directory
Disabled bluetooth.service for bluetooth.target.
Disabled bluetooth.service for dbus-org.bluez.service.
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 2e632b0..6e163bd 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -149,7 +149,7 @@ for service in $services; do
disable_service="$ROOT/etc/systemd/system/$r.wants/$service"
fi
rm -f $disable_service
- rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
+ [ -d $ROOT/etc/systemd/system/$r.wants ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by."
fi
done
More information about the Openembedded-commits
mailing list