From 02921cbd40821c7bc3dcce28c720d47828f7ece9 Mon Sep 17 00:00:00 2001 From: Evan Teitelman Date: Tue, 7 May 2013 15:25:09 -0400 Subject: 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. --- src/netctl.in | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3-24-g4f1b