From 1df5a67016d85a76ffd09e8ea234d0df23e9856b Mon Sep 17 00:00:00 2001 From: Felix Endres Date: Mon, 16 Apr 2007 16:04:01 +0000 Subject: AUFS changes. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@905 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'initramfs/initrd-stuff/etc/functions') 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 } -- cgit v1.2.3-55-g7522