2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

diskless support root options in addkcmdline (#5366)

* add root options

* polished

* polished
This commit is contained in:
Yuan Bai 2018-07-03 16:51:06 +08:00 committed by yangsong
parent da8983a95e
commit 21cf3c56d2

View File

@ -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