From 21cf3c56d255c2b60b01160f021270351b3b16a3 Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Tue, 3 Jul 2018 16:51:06 +0800 Subject: [PATCH] diskless support root options in addkcmdline (#5366) * add root options * polished * polished --- .../share/xcat/netboot/rh/dracut_033/xcatroot | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index f6701aa78..12888ba79 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -10,7 +10,7 @@ XCATMASTER=$XCAT STATEMNT="$(getarg STATEMNT=)" rootlimit="$(getarg rootlimit=)" xcatdebugmode="$(getarg xcatdebugmode=)" - +rflags="$(getarg rootflags=)" getarg nonodestatus NODESTATUS=$? @@ -77,10 +77,14 @@ if [ -r /rootimg.sfs ]; then elif [ -r /rootimg.cpio.gz ] || [ -r /rootimg.cpio.xz ]; then logger $SYSLOGHOST -t $log_label -p local4.info "Setting up RAM-root tmpfs on downloaded rootimg.cpio.[gz/xz]..." echo Setting up RAM-root tmpfs. - if [ -z $rootlimit ];then - mount -t tmpfs -o mode=755 rootfs $NEWROOT + rootopts="mode=755" + if [ -n "$rflags" ]; then + rootopts="$rootopts","$rflags" + fi + if [ -z "$rootlimit" ];then + mount -t tmpfs -o $rootopts rootfs $NEWROOT else - mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT + mount -t tmpfs -o "$rootopts",size=$rootlimit rootfs $NEWROOT fi cd $NEWROOT