support genimage -l for dracut mode

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15429 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin 2013-03-08 03:10:32 +00:00
parent baca52bda8
commit a2eb94fd1c

View File

@ -3,6 +3,8 @@ NEWROOT=$3
RWDIR=.statelite
XCATMASTER=$XCAT
. /lib/dracut-lib.sh
rootlimit="$(getarg rootlimit=)"
if [ ! -z "$imgurl" ]; then
if [ xhttp = x${imgurl%%:*} ]; then
NFS=0
@ -41,7 +43,12 @@ if [ -r /rootimg.sfs ]; then
mount --move /rw $NEWROOT/rw
elif [ -r /rootimg.gz ]; then
echo Setting up RAM-root tmpfs.
mount -t tmpfs -o mode=755 rootfs $NEWROOT
if [ -z $rootlimit ];then
mount -t tmpfs -o mode=755 rootfs $NEWROOT
else
mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
fi
cd $NEWROOT
echo -n "Extracting root filesystem:"
if [ -x /bin/cpio ]; then
@ -52,7 +59,13 @@ elif [ -r /rootimg.gz ]; then
echo Done
elif [ -r /rootimg-statelite.gz ]; then
echo Setting up RAM-root tmpfs for statelite mode.
mount -t tmpfs -o mode=755 rootfs $NEWROOT
if [ -z $rootlimit];then
mount -t tmpfs -o mode=755 rootfs $NEWROOT
else
mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
fi
cd $NEWROOT
echo -n "Extracting root filesystem:"
if [ -x /bin/cpio ]; then