aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/overlay.sh18
1 files changed, 4 insertions, 14 deletions
diff --git a/scripts/overlay.sh b/scripts/overlay.sh
index 090671c..e98c442 100755
--- a/scripts/overlay.sh
+++ b/scripts/overlay.sh
@@ -5,17 +5,7 @@ upper=/cfg/overlay/${1}
work=/cfg/overlay/${1}_work
target=${2}
-if [ ! -d "$target" ]; then
- exit
-fi
-
-if [ -d "$lower" ]; then
- if [ -d "$upper" ]; then
- mkdir -p "$work"
- mount -t overlay overlay \
- -olowerdir=${lower},upperdir=${upper},workdir=${work} \
- ${target}
- else
- mount --bind "$lower" "$target"
- fi
-fi
+mkdir -p "$work" "$upper"
+mount -t overlay overlay \
+ -olowerdir=${lower},upperdir=${upper},workdir=${work} \
+ "$target"