From 0b0a7b31401822a28ed2f30be1c55d5c76111528 Mon Sep 17 00:00:00 2001 From: Simo Leone Date: Tue, 5 Feb 2008 23:59:52 -0600 Subject: Change unionfs module loading 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 Signed-off-by: Dan McGee --- makechrootpkg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'makechrootpkg') 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 -- cgit v1.2.3-70-g09d2