[Ovirt-devel] [PATCH] Two convenience scripts to simplify appliance usage
Jeff Schroeder
jeffschroed at gmail.com
Tue Jul 1 01:31:20 UTC 2008
On Mon, Jun 30, 2008 at 5:33 PM, Perry N. Myers <pmyers at redhat.com> wrote:
> Chris Lalancette wrote:
>>
>> Perry Myers wrote:
>>>
>>> ovirt-firefox.sh is used to launch firefox on the appliance
>>> ovirt-view-vm.sh is used to launch virt-viewer on a specific managed node
>>> connected to a specific virtual machine.
>>
>> Sure, should make life a little easier.
>>
>>> +KNOWN_HOSTS=~/.ssh/ovirt-known_hosts
>>> +SSH_ARGS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=$KNOWN_HOSTS
>>> -Yf"
>>> +
>>> +rm -f $KNOWN_HOSTS > /dev/null 2>&1
At the point of arguing stupid semantics, this seems to do the same
with less moving code:
SSH_ARGS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -fY"
This looks pretty good.
>>> +ssh $SSH_ARGS 192.168.50.2 firefox --no-remote
>>
>> Sneaky. Redefine where the known hosts goes, and blow it away. Do we
>> need both
>> "StrictHostKeyChecking=no" and the removal of KnownHosts, though?
>
> Yes. Even with StrickHostKeyChecking=no, if you don't blow away known hosts
> you'll get a nasty warning message. And if you just do the known-hosts
> delete, you'll get a prompt to add the new key on each connect. So the
> combination does the trick. Of course, this is a controlled test
> environment. Don't do this at home, kids...
>
>> <snip>
>>
>>> +if [[ $# < 2 ]]; then
>>> + echo "usage: $0 node vm"
>>> + echo " node: hostname of node to connect to (i.e. node3)"
>>> + echo " vm : name of virtual machine on designated node to view"
>>> + exit 1
>>> +fi
>>
>> Minor whitespace damage.
>
> Already fixed :)
>
>>> +
>>> +NODE=$1
>>> +VM=$2
>>> +
>>> +rm -f $KNOWN_HOSTS > /dev/null 2>&1
>>> +ssh $SSH_ARGS 192.168.50.2 virt-viewer -c
>>> qemu+tcp://$NODE.priv.ovirt.org/system $VM
>>
>> Other than the two minor issues above, looks good, so I will ACK it.
>
> Thanks,
>
> Perry
--
Jeff Schroeder
Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com
More information about the ovirt-devel
mailing list