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

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

Welcome the new Life-Preserver restore ability to the Installer GUI

Now you can restore your entire system from a replicated life-preserver backup on a
remote machine

  • Property mode set to 100755
File size: 627 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 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.