diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2012-08-06 22:26:11 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-08-08 09:02:05 +0200 |
commit | 3ce8db6d187b864fa59206d4efa93b8f952b534e (patch) | |
tree | 089afb4dca67c2f81950ac5387a280277764f516 /meta-systemd/recipes-core | |
parent | e32c470d32809be3d0249097214881021532fb2c (diff) | |
download | meta-openembedded-3ce8db6d187b864fa59206d4efa93b8f952b534e.tar.gz |
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>
Diffstat (limited to 'meta-systemd/recipes-core')
-rw-r--r-- | meta-systemd/recipes-core/systemd/systemd-systemctl-native.bb | 2 | ||||
-rwxr-xr-x | meta-systemd/recipes-core/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 7ca77ae18..5f23e988e 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" | |||
3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" |
5 | 5 | ||
6 | PR = "r3" | 6 | PR = "r4" |
7 | 7 | ||
8 | inherit native | 8 | inherit native |
9 | 9 | ||
diff --git a/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-systemd/recipes-core/systemd/systemd-systemctl-native/systemctl index ff9e6a751..a5bd77085 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 | |||
25 | cmd_args="1" | 25 | cmd_args="1" |
26 | shift | 26 | shift |
27 | ;; | 27 | ;; |
28 | mask) | ||
29 | shift | ||
30 | |||
31 | action="$opt" | ||
32 | services="$1" | ||
33 | cmd_args="1" | ||
34 | shift | ||
35 | ;; | ||
28 | --root=*) | 36 | --root=*) |
29 | ROOT=${opt##--root=} | 37 | ROOT=${opt##--root=} |
30 | cmd_args="0" | 38 | cmd_args="0" |
@@ -43,6 +51,16 @@ while [ $# != 0 ]; do | |||
43 | done | 51 | done |
44 | 52 | ||
45 | for service in $services; do | 53 | for service in $services; do |
54 | if [ "$action" = "mask" ]; then | ||
55 | if [ ! -d $ROOT/etc/systemd/system/ ]; then | ||
56 | mkdir -p $ROOT/etc/systemd/system/ | ||
57 | fi | ||
58 | cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service" | ||
59 | echo "$cmd" | ||
60 | $cmd | ||
61 | exit 0 | ||
62 | fi | ||
63 | |||
46 | echo "Try to find location of $service..." | 64 | echo "Try to find location of $service..." |
47 | # find service file | 65 | # find service file |
48 | for p in $ROOT/etc/systemd/system \ | 66 | for p in $ROOT/etc/systemd/system \ |