summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorFelix Endres2007-04-21 16:06:22 +0200
committerFelix Endres2007-04-21 16:06:22 +0200
commit9b64a9f76af317898b63c939e7afb92ccc7f297d (patch)
tree969a0d116dab04ec58b17cc7d5119f1ab0cf90e6 /initramfs/initrd-stuff/init
parentFixed missing "'" ... (diff)
downloadcore-9b64a9f76af317898b63c939e7afb92ccc7f297d.tar.gz
core-9b64a9f76af317898b63c939e7afb92ccc7f297d.tar.xz
core-9b64a9f76af317898b63c939e7afb92ccc7f297d.zip
AUFS and UnionFS adjustments
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@913 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init30
1 files changed, 24 insertions, 6 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index ffcb351f..a3e24a83 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -144,13 +144,21 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
noldsc)
noldsc=yes;;
# additional source to unify root filesystem with
- union=*)
+ unionfs=*)
unionfs=1
- uniondirs=${opts#union=}
+ uniondirs=${opts#unionfs=}
;;
# if unionfs should be used over the complete root filesystem
unionfs)
unionfs=1;;
+ # Same for AUFS
+ aufs=*)
+ aufs=1
+ uniondirs=${opts#aufs=}
+ ;;
+ # if unionfs should be used over the complete root filesystem
+ aufs)
+ aufs=1;;
# if cowloop should be used, only ontop of network block device and in
# combination with classical fs, like ext2 useful
cowloop=*)
@@ -452,17 +460,27 @@ $(sysup)"
hwautocfg main &
fi
+union_type=""
# try to use unionfs for rw access if available
-if [ -n "${unionfs}" -o -n "${union}" ] ; then
- union_type=""
+if [ -n "${unionfs}" ]; then
modprobe ${MODPRV} unionfs && union_type="unionfs"
- modprobe ${MODPRV} aufs && union_type="aufs"
if [ -z "$union_type" ]; then
error "$init_loadufs" nonfatal
unionfs="";
+ # if unionfs is not available, check for aufs and inform user
+ modprobe ${MODPRV} -n aufs && error $init_noufs_butaufs
+ fi
+fi
+# try to use aufs for rw access if available
+if [ -n "${aufs}" ]; then
+ modprobe ${MODPRV} aufs && union_type="aufs"
+ if [ -z "$union_type" ]; then
+ error "$init_loadaufs" nonfatal
+ aufs="";
+ # if aufs is not available, check for unionfs and inform user
+ modprobe ${MODPRV} -n unionfs && error $init_noaufs_butufs
fi
fi
-
# setup of client root filesystem dependent on the availability of UnionFS
if [ -n "${unionfs}" ] ; then
echo "Using UnionFS for rw access"