aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-09-17 10:58:07 +0000
committerEric Bénard <eric@eukrea.com>2012-12-16 10:50:25 +0100
commite5b3091351d96dcb89cec287357c67be53e46e7d (patch)
tree23f8cbf6a47c09e245cd32d671bed253459875c8
parentf713db38526895eeaf97678aa0a41cb7ff641d41 (diff)
downloadmeta-openembedded-e5b3091351d96dcb89cec287357c67be53e46e7d.tar.gz
meta-openembedded-e5b3091351d96dcb89cec287357c67be53e46e7d.tar.bz2
meta-openembedded-e5b3091351d96dcb89cec287357c67be53e46e7d.zip
systemd-systemctl-native: extend systemctl wrapper to support mask action
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Eric Bénard <eric@eukrea.com>
-rw-r--r--meta-oe/recipes-core/systemd/systemd-systemctl-native.bb2
-rwxr-xr-xmeta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl18
2 files changed, 19 insertions, 1 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb b/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
index 7ca77ae18..5f23e988e 100644
--- a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
-PR = "r3"
+PR = "r4"
inherit native
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
index 46e74e847..f74adf6c6 100755
--- a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
+++ b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl
@@ -25,6 +25,14 @@ while [ $# != 0 ]; do
cmd_args="1"
shift
;;
+ mask)
+ shift
+
+ action="$opt"
+ services="$1"
+ cmd_args="1"
+ shift
+ ;;
--root=*)
ROOT=${opt##--root=}
cmd_args="0"
@@ -43,6 +51,16 @@ while [ $# != 0 ]; do
done
for service in $services; do
+ if [ "$action" = "mask" ]; then
+ if [ ! -d $ROOT/etc/systemd/system/ ]; then
+ mkdir -p $ROOT/etc/systemd/system/
+ fi
+ cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service"
+ echo "$cmd"
+ $cmd
+ exit 0
+ fi
+
echo "Try to find location of $service..."
# find service file
for p in $ROOT/etc/systemd/system \