diff options
author | Felix Endres | 2007-04-21 16:34:00 +0200 |
---|---|---|
committer | Felix Endres | 2007-04-21 16:34:00 +0200 |
commit | 2f0b206504e1421c78cd2630f62005b20a44afe0 (patch) | |
tree | 80b960a77d3aa5a3a88a85a7e0e1c526ac07c635 /initramfs/initrd-stuff/init | |
parent | AUFS and UnionFS adjustments (diff) | |
download | core-2f0b206504e1421c78cd2630f62005b20a44afe0.tar.gz core-2f0b206504e1421c78cd2630f62005b20a44afe0.tar.xz core-2f0b206504e1421c78cd2630f62005b20a44afe0.zip |
Bugfixing and fine-tuning last changes
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@914 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-x | initramfs/initrd-stuff/init | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index a3e24a83..b9f828b8 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -389,9 +389,10 @@ if [ -n "${nbdmod}" ] ; then [ -x /bin/mdev ] && mdev -s fi if [ -n "${cowloop}" ] ; then - if [ -n "${unionfs}" ] ; then + if [ -n "${unionfs}" -o -n "${aufs}" ] ; then error "$init_cownonbd" unionfs=""; + aufs=""; fi echo "Using Copy-on-Write block device for rw access" mount -n -t tmpfs -o size=${cowsize} ramfs ${rwdir} @@ -463,7 +464,7 @@ fi union_type="" # try to use unionfs for rw access if available if [ -n "${unionfs}" ]; then - modprobe ${MODPRV} unionfs && union_type="unionfs" + modprobe ${MODPRV} unionfs && union_type="UnionFS" if [ -z "$union_type" ]; then error "$init_loadufs" nonfatal unionfs=""; @@ -473,7 +474,7 @@ if [ -n "${unionfs}" ]; then fi # try to use aufs for rw access if available if [ -n "${aufs}" ]; then - modprobe ${MODPRV} aufs && union_type="aufs" + modprobe ${MODPRV} aufs && union_type="AUFS" if [ -z "$union_type" ]; then error "$init_loadaufs" nonfatal aufs=""; @@ -482,16 +483,17 @@ if [ -n "${aufs}" ]; then fi fi # setup of client root filesystem dependent on the availability of UnionFS -if [ -n "${unionfs}" ] ; then - echo "Using UnionFS for rw access" +if [ -n "${unionfs}" -o -n "${aufs}" ] ; then + echo "Using ${union_type} for rw access" mkdir -p ${rwdir}/union ${rwdir}/uniontmp /rorootfs mount -n -t tmpfs none ${rwdir}/uniontmp # hack for handling unionfs with patched run-init mount -n --move /mnt /rorootfs - if [ "$union_type" == "unionfs" ]; then + if [ "$union_type" == "UnionFS" ]; then mount -n -t unionfs -o dirs=${rwdir}/uniontmp:/rorootfs=${nfsro}ro \ none /mnt - else mount -n -t aufs -o br:/${rwdir}/uniontmp:/rorootfs=ro none /mnt + elif [ "$union_type" == "AUFS" ]; then + mount -n -t aufs -o br:/${rwdir}/uniontmp:/rorootfs=ro none /mnt fi mkdir -p /mnt/uniontmp mount -n --move ${rwdir}/uniontmp /mnt/uniontmp @@ -499,7 +501,7 @@ if [ -n "${unionfs}" ] ; then # if additional sources should be used for a combined root filesystem # probably more sources should be merged into union (${union} is defined) # allow more than one union?? - if [ -n "${union}" ] ; then + if [ -n "${unionfs}" -o -n "${aufs}" ] ; then # for dir in "${union}"; do # testmkd /unionadd/$dir # mount $dir unionadd/$dir |