diff --git a/xCAT-server/lib/xcat/plugins/nimol.pm b/xCAT-server/lib/xcat/plugins/nimol.pm index ae02590fc..8257a8b08 100644 --- a/xCAT-server/lib/xcat/plugins/nimol.pm +++ b/xCAT-server/lib/xcat/plugins/nimol.pm @@ -361,7 +361,8 @@ sub update_export { push @tmp_options, "insecure"; $need_update = 1; } - push @new_export, join(',',@tmp_options); + my $option = join(',',@tmp_options); + push @new_export, "/install *($option)"; } else { push @new_export, $line; } @@ -391,7 +392,7 @@ sub update_syslog { close($syslog_fd); unless (grep /local2.*nimol\.log/, @curr_syslog) { my $new_syslog_fd; - open($new_syslog_fd, ">>", "/etc/exports"); + open($new_syslog_fd, ">>", "/etc/rsyslog.conf"); print $new_syslog_fd "local2.* /var/log/nimol.log\n"; close($new_syslog_fd); #system("service rsyslog restart"); @@ -412,6 +413,7 @@ sub create_imgconf_file { my $bootimg_link = "/tftpboot/vios/nodes"; my $relative_path = $bootimg_link; $relative_path =~ s/^\/tftpboot//; + $bootimg_root =~ s/^\/tftpboot//; # check the dir where the bootimage link file and bootimage configuration file stored unless (-e $bootimg_link) { mkpath($bootimg_link); @@ -430,10 +432,11 @@ sub create_imgconf_file { unless (defined($rootpw)) { return "Unable to find requested password from passwd, with key=vios,username=padmin"; } - unless (-e $bootimg_root."/viobootimg") { + + chdir($bootimg_link); + unless (-e "../../".$bootimg_root."/viobootimg") { return "Unable to find VIOS bootimg file"; } - chdir($bootimg_link); foreach my $node (@$nodes) { my $bootimg_conf_fd; my $gateway = $nethash{$node}{gateway}; @@ -444,7 +447,7 @@ sub create_imgconf_file { my $master_ip = xCAT::NetworkUtils->getipaddr($master); my $node_ip = xCAT::NetworkUtils->getipaddr($node); unless (-e "$node") { - symlink($bootimg_root."/viobootimg", "$node"); + symlink("../../".$bootimg_root."/viobootimg", "$node"); } if (-e $bootimg_link."/$node.info") { unlink($bootimg_link."/$node.info"); diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index bed779b5b..7061270ba 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -679,11 +679,12 @@ sub process_request { #} if ($do_dhcpsetup) { if (%osimagenodehash) { - chdir("$tftpdir"); + unless (-e "$tftpdir/yb/node") { + system("mkdir -p $tftpdir/yb/node"); + } + chdir("$tftpdir/yb/node"); foreach my $osimage (keys %osimagenodehash) { - unless (-e "$tftpdir/yb/node") { - system("mkdir -p $tftpdir/yb/node"); - } + my $osimgent = $osimagetab->getAttribs({imagename => $osimage },'osvers'); my $osentry = $osimgent->{'osvers'}; @@ -702,10 +703,10 @@ sub process_request { } if (($osv =~ /rh/ and int($osn) >= 6) or ($osv =~ /sles/ and int($osn) >= 11)) { - my $fpath = "/yb/". $osentry."/yaboot"; foreach my $tmp_node (@{$osimagenodehash{$osimage}}) { - unless (-e "yb/node/yaboot-$tmp_node") { - symlink("yb/$osentry/yaboot", "yb/node/yaboot-$tmp_node"); + unless (-e "yaboot-$tmp_node") { + symlink("../$osentry/yaboot", "yaboot-$tmp_node"); + #symlink("/tftpboot/yb/$osentry/yaboot", "yb/node/yaboot-$tmp_node"); } } if ($::YABOOT_request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command @@ -718,8 +719,8 @@ sub process_request { } } else { foreach my $tmp_node (@{$osimagenodehash{$osimage}}) { - unless (-e "yb/node/yaboot-$tmp_node") { - symlink("yaboot", "yb/node/yaboot-$tmp_node"); + unless (-e "yaboot-$tmp_node") { + symlink("../../yaboot", "yb/node/yaboot-$tmp_node"); } }