From 3ab8f9db0450f681dfb6d79ab74b1f39467a73d8 Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 13 Jul 2012 20:12:46 +0000 Subject: [PATCH] add mntopts to the litetree command git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13298 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/litetree.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/litetree.pm b/xCAT-server/lib/xcat/plugins/litetree.pm index c519c15d1..16bd946cc 100644 --- a/xCAT-server/lib/xcat/plugins/litetree.pm +++ b/xCAT-server/lib/xcat/plugins/litetree.pm @@ -199,7 +199,7 @@ sub showSync { foreach my $priority (sort {$a <=> $b} keys %$dirs){ # split the nfs server up from the directory: my $mntpnt; - my ($server, $dir) = split(/:/,$dirs->{$priority}); + my ($server, $dir, $mntopts) = split(/:/,$dirs->{$priority}); # if server is blank then its the directory: unless($dir){ @@ -226,6 +226,12 @@ sub showSync { } } $mntpnt .= $dir; + + # add the mount options if we have any + if ($mntopts) { + $mntpnt .= " :$mntopts"; + } + # ok, now we have all the mount points. Let's go through them all? if ($::from_lslite == 1) { @@ -303,7 +309,7 @@ sub getNodeData { my @imageInfo; my @attrs; if($type eq "dir"){ - @attrs = ('priority', 'directory'); + @attrs = ('priority', 'directory', 'mntopts'); }elsif($type =~ /file|image/){ @attrs = ('file','options'); }elsif($type =~ /location/){ @@ -341,7 +347,7 @@ sub mergeArrays { if($type eq "dir"){ foreach(@$arr){ if($_->{directory} eq ''){ next; } - $attrs->{$_->{priority}} = $_->{directory}; + $attrs->{$_->{priority}} = "$_->{directory}:$_->{mntopts}"; } }elsif($type =~ /file|image/){