mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
systemd-systemctl-native: Add additional messages for better debugging
These messages helped me to fix the breakage of networkmanager/systemd Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Eric Bénard <eric@eukrea.com>
This commit is contained in:
committed by
Eric Bénard
parent
06606bba44
commit
f713db3852
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
|
|||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||||
|
|
||||||
PR = "r2"
|
PR = "r3"
|
||||||
|
|
||||||
inherit native
|
inherit native
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
echo "Started $0 $*"
|
||||||
|
|
||||||
ROOT=
|
ROOT=
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ while [ $# != 0 ]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for service in $services; do
|
for service in $services; do
|
||||||
|
echo "Try to find location of $service..."
|
||||||
# find service file
|
# find service file
|
||||||
for p in $ROOT/etc/systemd/system \
|
for p in $ROOT/etc/systemd/system \
|
||||||
$ROOT/lib/systemd/system \
|
$ROOT/lib/systemd/system \
|
||||||
@@ -55,6 +57,7 @@ for service in $services; do
|
|||||||
echo "'$service' couldn't be found; exiting with error"
|
echo "'$service' couldn't be found; exiting with error"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "Found $service in $service_file"
|
||||||
|
|
||||||
# create the required symbolic links
|
# create the required symbolic links
|
||||||
wanted_by=$(grep WantedBy $ROOT/$service_file \
|
wanted_by=$(grep WantedBy $ROOT/$service_file \
|
||||||
@@ -63,6 +66,7 @@ for service in $services; do
|
|||||||
| grep '\.target$')
|
| grep '\.target$')
|
||||||
|
|
||||||
for r in $wanted_by; do
|
for r in $wanted_by; do
|
||||||
|
echo "WantedBy=$r found in $service"
|
||||||
if [ "$action" = "enable" ]; then
|
if [ "$action" = "enable" ]; then
|
||||||
mkdir -p $ROOT/etc/systemd/system/$r.wants
|
mkdir -p $ROOT/etc/systemd/system/$r.wants
|
||||||
ln -s $service_file $ROOT/etc/systemd/system/$r.wants
|
ln -s $service_file $ROOT/etc/systemd/system/$r.wants
|
||||||
@@ -79,6 +83,7 @@ for service in $services; do
|
|||||||
| sed 's,Also=,,g' \
|
| sed 's,Also=,,g' \
|
||||||
| tr ',' '\n')
|
| tr ',' '\n')
|
||||||
for a in $also; do
|
for a in $also; do
|
||||||
|
echo "Also=$a found in $service"
|
||||||
if [ "$action" = "enable" ]; then
|
if [ "$action" = "enable" ]; then
|
||||||
$0 --root=$ROOT enable $a
|
$0 --root=$ROOT enable $a
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user