2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-21 05:25:32 +00:00

Merge pull request #7197 from gurevichmark/switchprobe_link

Better file linking for xCAT-probe
This commit is contained in:
besawn
2022-06-10 11:01:48 -04:00
committed by GitHub
3 changed files with 13 additions and 5 deletions

View File

@ -1 +0,0 @@
/opt/xcat/bin/xcatclient /opt/xcat/probe/subcmds/bin/switchprobe

View File

@ -71,10 +71,6 @@ if [ -e %{prefix}/probe/subcmds/bin/switchprobe ]; then
else
mkdir -p %{prefix}/probe/subcmds/bin/
fi
cd %{prefix}/probe/subcmds/bin/
if [ -e %{prefix}/bin/xcatclient ]; then
ln -s %{prefix}/bin/xcatclient switchprobe
fi
%preun
#remove the bin directory if not on upgrade

View File

@ -259,6 +259,19 @@ foreach my $attr (@tmpargv) {
}
}
# Create symlink /opt/xcat/probe/subcmds/bin/switchprobe -> /opt/xcat/bin/xcatclient if not already there
my $switchprobe_link = $plugin_dir."/bin/switchprobe";
unless (-l $switchprobe_link) {
my $xcatclient = `which xcatclient`;
chomp($xcatclient);
if ($xcatclient) {
symlink($xcatclient, $switchprobe_link);
}
else {
print "Can not create symbolic link $switchprobe_link to xcatclient. xCAT-client package not installed.\n";
exit 1;
}
}
&loadsubcmds;
if (defined($pluginname)) {