summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2008-08-06 14:55:13 +0200
committerJames Rayner <james@archlinux.org>2008-08-06 14:55:13 +0200
commitabf85ef49e301fabdef07eccea5f8efcd9406932 (patch)
tree095c7e63732e2a30db31924b64ac8a2eb2e1fca2 /src
parentd5378547e1179cd09bdad3bb38dcf4c30cfffe69 (diff)
downloadnetctl-abf85ef49e301fabdef07eccea5f8efcd9406932.tar.gz
netctl-abf85ef49e301fabdef07eccea5f8efcd9406932.tar.xz
Add any missing /var/run dirs FS#10768
Diffstat (limited to 'src')
-rw-r--r--src/network.subr6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network.subr b/src/network.subr
index ecc702f..326ca6e 100644
--- a/src/network.subr
+++ b/src/network.subr
@@ -60,6 +60,7 @@ all_down()
#
all_suspend()
{
+ [[ ! -d $STATE_DIR ]] && mkdir -p $STATE_DIR/{interfaces,profiles}
[[ ! -d $STATE_DIR/suspend ]] && mkdir $STATE_DIR/suspend
ls -1 $STATE_DIR/profiles/ | while read prof; do
@@ -84,6 +85,8 @@ all_resume()
#
profile_up()
{
+
+ [[ ! -d $STATE_DIR ]] && mkdir -p $STATE_DIR/{interfaces,profiles}
load_profile $1 || return 1
@@ -131,6 +134,9 @@ profile_up()
#
profile_down()
{
+
+ [[ ! -d $STATE_DIR ]] && mkdir -p $STATE_DIR/{interfaces,profiles}
+
load_profile $1 || return 1
if ! check_profile $1; then