summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorFelix Endres2007-04-16 18:04:01 +0200
committerFelix Endres2007-04-16 18:04:01 +0200
commit1df5a67016d85a76ffd09e8ea234d0df23e9856b (patch)
tree1771c7c292e68cb4666138bcec76d276dac8a36b /initramfs/initrd-stuff/init
parentChanged to maximum of 80 chars/line (diff)
downloadcore-1df5a67016d85a76ffd09e8ea234d0df23e9856b.tar.gz
core-1df5a67016d85a76ffd09e8ea234d0df23e9856b.tar.xz
core-1df5a67016d85a76ffd09e8ea234d0df23e9856b.zip
AUFS changes.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@905 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init19
1 files changed, 13 insertions, 6 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 023682a5..ffcb351f 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -454,9 +454,13 @@ fi
# try to use unionfs for rw access if available
if [ -n "${unionfs}" -o -n "${union}" ] ; then
- modprobe ${MODPRV} unionfs || {
- error "$init_loadufs" nonfatal
- unionfs=""; }
+ union_type=""
+ modprobe ${MODPRV} unionfs && union_type="unionfs"
+ modprobe ${MODPRV} aufs && union_type="aufs"
+ if [ -z "$union_type" ]; then
+ error "$init_loadufs" nonfatal
+ unionfs="";
+ fi
fi
# setup of client root filesystem dependent on the availability of UnionFS
@@ -466,8 +470,11 @@ if [ -n "${unionfs}" ] ; then
mount -n -t tmpfs none ${rwdir}/uniontmp
# hack for handling unionfs with patched run-init
mount -n --move /mnt /rorootfs
- mount -n -t unionfs -o dirs=${rwdir}/uniontmp:/rorootfs=${nfsro}ro \
- none /mnt
+ 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
+ fi
mkdir -p /mnt/uniontmp
mount -n --move ${rwdir}/uniontmp /mnt/uniontmp
chmod 0755 /mnt/uniontmp /mnt
@@ -607,7 +614,7 @@ cp /etc/machine-setup /mnt/etc
# If locations are given that should be unioned with the fs root, do it
if [ -n "$uniondirs" ]; then
- include_in_fsroot_union $uniondirs
+ include_in_fsroot_union $union_type $uniondirs
fi
# post init for some distro specific (fixme!! more elegant solution)