source: src-qt4/pc-installgui/scripts/get-zfs-restore-list.sh @ 7ae348f

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 7ae348f was 7ae348f, checked in by Kris Moore <kris@…>, 13 months ago

Don't fail when getting a list of backups from the remote box due to hostkey

  • Property mode set to 100755
File size: 655 bytes
Line 
1#!/bin/sh
2# Script for Life-Preserver which checks a remote box and prints a list of
3# available restore points
4###########################################################################
5
6SSHUSER=$1
7SSHHOST=$2
8SSHPORT=$3
9SSHKEY=$4
10
11if [ -z "${SSHUSER}" -o -z "${SSHHOST}" -o -z "${SSHPORT}" ]; then
12  echo "ERROR: Usage get-zfs-restore-list.sh <user> <host> <port>"
13  touch /tmp/.ssh-list-failed
14  exit 150
15fi
16
17if [ -n "$SSHKEY" ] ; then
18   SSHKEY="-i $SSHKEY"
19fi
20
21cd /root
22
23ssh ${SSHKEY} -p $SSHPORT -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o NumberOfPasswordPrompts=0 $SSHUSER@$SSHHOST 'ls .lp-props* 2>/dev/null' 2>/dev/null
24exit $?
Note: See TracBrowser for help on using the repository browser.