[oe-commits] Martin Jansa : systemd-systemctl-native: extend systemctl wrapper to support mask action
git at git.openembedded.org
git at git.openembedded.org
Wed Aug 8 07:10:33 UTC 2012
Module: meta-openembedded.git
Branch: master
Commit: 3ce8db6d187b864fa59206d4efa93b8f952b534e
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=3ce8db6d187b864fa59206d4efa93b8f952b534e
Author: Martin Jansa <martin.jansa at gmail.com>
Date: Mon Aug 6 22:26:11 2012 +0000
systemd-systemctl-native: extend systemctl wrapper to support mask action
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
---
.../systemd/systemd-systemctl-native.bb | 2 +-
.../systemd/systemd-systemctl-native/systemctl | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/meta-systemd/recipes-core/systemd/systemd-systemctl-native.bb b/meta-systemd/recipes-core/systemd/systemd-systemctl-native.bb
index 7ca77ae..5f23e98 100644
--- a/meta-systemd/recipes-core/systemd/systemd-systemctl-native.bb
+++ b/meta-systemd/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-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl
index ff9e6a7..a5bd770 100755
--- a/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl
+++ b/meta-systemd/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 \
More information about the Openembedded-commits
mailing list