summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions b/functions
index 81a6072..9a29a17 100644
--- a/functions
+++ b/functions
@@ -635,6 +635,11 @@ initialize_buildroot() {
fi
buildroot=${2:-$workdir/root}
+ if [[ ! -w ${2:-$workdir} ]]; then
+ error 'Unable to write to build root: %s' "$buildroot"
+ return 1
+ fi
+
# base directory structure
install -dm755 "$buildroot"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local,lib,bin}}
ln -s "usr/lib" "$buildroot/lib"