summaryrefslogtreecommitdiffstats
path: root/makechrootpkg
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg8
1 files changed, 7 insertions, 1 deletions
diff --git a/makechrootpkg b/makechrootpkg
index b4c94ce..cf1ee26 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -104,7 +104,13 @@ cleanup ()
uniondir="$chrootdir/union"
echo "building union chroot"
-modprobe -q unionfs
+grep -Fq unionfs /proc/filesystems
+if [ $? -ne 0 ]; then
+ modprobe -q unionfs
+ if [ $? -ne 0 ];
+ echo "ERROR: No unionfs available. Abandon ship!" && exit 1
+ fi
+fi
mount -t unionfs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$uniondir"
trap 'cleanup' 0 1 2 15