diff --git a/xCAT-probe/debian/xcat-probe.links b/xCAT-probe/debian/xcat-probe.links deleted file mode 100644 index 8737b5e45..000000000 --- a/xCAT-probe/debian/xcat-probe.links +++ /dev/null @@ -1 +0,0 @@ -/opt/xcat/bin/xcatclient /opt/xcat/probe/subcmds/bin/switchprobe diff --git a/xCAT-probe/xCAT-probe.spec b/xCAT-probe/xCAT-probe.spec index 432c78213..847f8a4ab 100644 --- a/xCAT-probe/xCAT-probe.spec +++ b/xCAT-probe/xCAT-probe.spec @@ -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 diff --git a/xCAT-probe/xcatprobe b/xCAT-probe/xcatprobe index 4116164a4..5a732c783 100755 --- a/xCAT-probe/xcatprobe +++ b/xCAT-probe/xcatprobe @@ -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)) { diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index e41499802..c39f5cfd2 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -21,14 +21,8 @@ check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 -# Check host keys supported by the operating system and report new ones, if any. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +# Obtain the highest version of TLS supported by OpenSSL/TLS. +cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 check:rc==0 end @@ -67,13 +61,7 @@ cmd:sleep 5 cmd:service goconserver status cmd:service conserver status -# Check host keys supported by the operating system and report new ones, if any. -cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys -check:rc==0 -cmd:ssh-keygen --help 2>&1 | grep "\[-t" | cut -d "[" -f4 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 > /tmp/current_os_host_keys -check:rc==0 -cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys -check:output!~> -cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys +# Obtain the highest version of TLS supported by OpenSSL/TLS. +cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1 check:rc==0 end