diff options
author | Felix Endres | 2007-04-16 18:04:01 +0200 |
---|---|---|
committer | Felix Endres | 2007-04-16 18:04:01 +0200 |
commit | 1df5a67016d85a76ffd09e8ea234d0df23e9856b (patch) | |
tree | 1771c7c292e68cb4666138bcec76d276dac8a36b /initramfs/initrd-stuff/etc/functions | |
parent | Changed to maximum of 80 chars/line (diff) | |
download | core-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/etc/functions')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index c9f8c8be..9a049c15 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -944,7 +944,8 @@ done # It will then try to mount these uris and add them to the union at / include_in_fsroot_union () { union_id=0 # used to have guarantee differing names for the unions mount point - for ROOTFS in `echo $1 |sed 's/,/ /g'`; do + union_type=$1 + for ROOTFS in `echo $2 |sed 's/,/ /g'`; do union_id=$(( $union_id + 1 )) srvproto=$(uri_token $ROOTFS prot) case $srvproto in @@ -980,7 +981,16 @@ include_in_fsroot_union () { #iscsitarget=$(uri_token $ROOTFS path) ;; esac - unionctl /mnt/ --add --after 1 --mode ro /mnt/tmp/${root_path}_${union_id} + if [ "X$union_type" == "Xunionfs" ]; then + echo "Using unionctl to mount ${root_path}_${union_id} (type: $union_type)" + unionctl /mnt/ --add --after 1 --mode ro /mnt/tmp/${root_path}_${union_id} + elif [ "X$union_type" == "Xaufs" ]; then + #unionctl for aufs is a sh script needing tools not included in our initrd + echo "Using aufs-mount to mount ${root_path}_${union_id} (type: $union_type)" + mount -n -o remount,add:1:/mnt/tmp/${root_path}_${union_id}=ro none /mnt + else + error $init_loadunions nonfatal + fi done } |