summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2015-03-13 19:41:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 10:59:04 +0000
commit0332e19098d7d3d623a04098b43e3b2482af1a17 (patch)
tree7ce65b504e0d00224d2fa1016738912523f49785 /meta/recipes-core
parent15df9519e3c22dac77d4d06bb4832e12ffadf5df (diff)
downloadopenembedded-core-0332e19098d7d3d623a04098b43e3b2482af1a17.tar.gz
openembedded-core-0332e19098d7d3d623a04098b43e3b2482af1a17.tar.bz2
openembedded-core-0332e19098d7d3d623a04098b43e3b2482af1a17.zip
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@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 2e632b00bc..6e163bd5c2 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