summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Leone <simo@archlinux.org>2008-02-06 06:59:52 +0100
committerDan McGee <dan@archlinux.org>2008-02-06 17:10:14 +0100
commit0b0a7b31401822a28ed2f30be1c55d5c76111528 (patch)
treedd3e4fb6a4a8715aae193208c3ee94b96404f5cd
parente0f139ad0e2b4144c39fa4431d174f453eb0ca52 (diff)
downloaddevtools-0.5.tar.gz
devtools-0.5.tar.xz
Change unionfs module loading0.5
Checking /proc/filesystems for unionfs is friendlier for kernels with unionfs builtin. Also, a total lack of unionfs now causes makechrootpkg to bail out. Signed-off-by: Simo Leone <simo@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-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