Execute source before running non-interactive ssh
The SSH command execution shell is a non-interactive shell. The commands from the file /etc/profile are executed only when bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option. Hence need to source /etc/profile explicitly Change-Id: I88560431e7e14b70ccc1cdab77b218036b586f96
This commit is contained in:
parent
5530e30eb9
commit
0e45dbe4db
@ -119,7 +119,7 @@ fi
|
||||
echo "Found Hypervisor hostname: $HYPERVISOR"
|
||||
|
||||
fc_pci_device_cmd="echo \$$FC_PCI_VAR_NAME"
|
||||
fc_pci_device=$(ssh -i $PROVIDER_KEY $PROVIDER_USER@$HYPERVISOR "$fc_pci_device_cmd")
|
||||
fc_pci_device=$(ssh -i $PROVIDER_KEY $PROVIDER_USER@$HYPERVISOR "source /etc/profile; $fc_pci_device_cmd")
|
||||
|
||||
if [[ -z $fc_pci_device ]]; then
|
||||
echo "No FC device known. Set fc_pci_device in your /etc/profile.d or /etc/environment (depending on distro and ssh configuration) to the desired 'Class Device path', e.g. '0000:21:00.2'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user