summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Teitelman <teitelmanevan@gmail.com>2013-05-07 21:25:09 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-05-15 21:23:01 +0200
commit02921cbd40821c7bc3dcce28c720d47828f7ece9 (patch)
treebb0a8927b2263c3ddbd363ab0ca65f9a030ef6ea
parent3ec2c1d04f8571ac5683f08518d959241a75e6a0 (diff)
downloadnetctl-02921cbd40821c7bc3dcce28c720d47828f7ece9.tar.gz
netctl-02921cbd40821c7bc3dcce28c720d47828f7ece9.tar.xz
Make a directory for a unit file link before creating the link itself.
The '/etc/systemd/system/multi-user.target.wants' directory does not necessarily exist before netctl is invoked.
-rw-r--r--src/netctl.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/netctl.in b/src/netctl.in
index e9325e3..51ffe02 100644
--- a/src/netctl.in
+++ b/src/netctl.in
@@ -121,6 +121,7 @@ unit_enable() {
printf 'After="netctl@%s.service"\n' \
$(sd_escape "${After[@]}") >> "$unit"
fi
+ mkdir -p "@systemdsystemconfdir@/multi-user.target.wants"
echo "ln -s '$unit' '${unit/system\//system/multi-user.target.wants/}'"
ln -s "$unit" "${unit/system\//system/multi-user.target.wants/}"
systemctl daemon-reload