aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-04-21 18:56:39 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-04-21 18:56:39 -0500
commit23d806ca24845261fd89104c16bc28a60505fe5c (patch)
treecb112f7833d4f33f6e507dd897f2155c7dc5b309 /init.d
parentde7d184909d561b68b411325d32471c047549bca (diff)
savecache: clean up creation of cache directory
The cache directory should be created via mkdir -p instead of mkdir. This makes sure all parent directories are created. Also, we now display an error message explaining that we were unable to create the cache directory if creation fails.
Diffstat (limited to 'init.d')
-rw-r--r--init.d/savecache.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.d/savecache.in b/init.d/savecache.in
index 9040732c..ddd58d7e 100644
--- a/init.d/savecache.in
+++ b/init.d/savecache.in
@@ -25,12 +25,12 @@ start()
local rc=
if [ ! -d "$RC_LIBEXECDIR"/cache ]; then
rm -rf "$RC_LIBEXECDIR"/cache
- if ! mkdir "$RC_LIBEXECDIR"/cache; then
+ if ! mkdir -p "$RC_LIBEXECDIR"/cache; then
rc=$?
if yesno "${RC_GOINGDOWN}"; then
rc=0
fi
- eend $rc
+ eend $rc "Unable to create $RC_SVCDIR/cache"
return $rc
fi
fi