From 93bf5ccbc2bf4c0dd3418851165f7759edeb7dd3 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Fri, 5 Mar 2010 08:05:47 +0000 Subject: [PATCH] -add permission support for statelite on redhat git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5380 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/genimage | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 481b1fefe..48a7b3437 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -47,6 +47,8 @@ my $otherpkglist; my $postinstall_filename; my $rootimg_dir; my $rwfiles; # these files are used by statelite for tmpfs rw +my $mode; +my $permission; # the permission works only for statelite mode currently sub xdie { @@ -65,7 +67,8 @@ GetOptions( 'l=s' => \$rootlimit, 't=s' => \$tmplimit, 'k=s' => \$kernelver, - 'm=s' => \$mode + 'm=s' => \$mode, + 'permission=s' => \$permission ); if (@ARGV > 0) { $imagename=$ARGV[0]; @@ -130,6 +133,12 @@ if (@ARGV > 0) { $destdir=$ref1->{'rootimgdir'}; } +if ($mode eq "statelite") { + if (!$permission) { + $permission = "755"; + } +} + if (!$arch) { $arch = `uname -m`; chomp($arch); @@ -672,7 +681,7 @@ if [ "\$NFSROOT" = "1" ]; then shell done grep '\\(shell\\)' /proc/cmdline >/dev/null && shell - mount -t tmpfs rw \$NEWROOT/\$RWDIR + mount -t tmpfs rw -o mode=$permission \$NEWROOT/\$RWDIR mkdir -p \$NEWROOT/\$RWDIR/tmpfs