From f3861be3d170e5c29f764285f6ad10ef317b0261 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sat, 29 Dec 2012 21:34:31 +0100 Subject: Make paths available for state files --- src/ifplugd.action | 1 + src/lib/auto.action | 1 + src/netctl | 1 + 3 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/ifplugd.action b/src/ifplugd.action index 3a28505..4acb45b 100755 --- a/src/ifplugd.action +++ b/src/ifplugd.action @@ -36,6 +36,7 @@ case "$2" in fi for profile in "${preferred_profiles[@]}" "${dhcp_profiles[@]}" "${static_profiles[@]}"; do if "$SUBR_DIR/nework" start "$profile"; then + mkdir -p "$(dirname "$PROFILE_FILE")" printf "%s" "$profile" > "$PROFILE_FILE" exit 0 fi diff --git a/src/lib/auto.action b/src/lib/auto.action index 00a4d14..bfb5f1d 100755 --- a/src/lib/auto.action +++ b/src/lib/auto.action @@ -24,6 +24,7 @@ case $action in fi DHCPOptions+=" -K" ip_set || exit 1 + mkdir -p "$(dirname "$PROFILE_FILE")" printf "%s" "$profile" > "$PROFILE_FILE" # JP: sandbox the eval if ! ( eval $ExecUpPost ); then diff --git a/src/netctl b/src/netctl index 0a82f89..524d03b 100755 --- a/src/netctl +++ b/src/netctl @@ -36,6 +36,7 @@ list() { } store() { + mkdir -p "$(dirname "$STATE_FILE")" systemctl list-units --type=service --full --no-legend --no-pager | \ cut -d\ -f1 | grep "^netctl@" > "$STATE_FILE" } -- cgit v1.2.3-24-g4f1b