diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-05-21 22:55:16 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-05-21 22:55:16 -0400 |
commit | 979f35f364fe1be6cbaeb38d881713d49683c739 (patch) | |
tree | ec24799b12346a4e7d7a66d5ba432f89ca8c8329 /etc/rc.restore_full_backup | |
parent | eb2c4175fe906c5cca5fa7767490796497c8a106 (diff) | |
download | pfsense-979f35f364fe1be6cbaeb38d881713d49683c739.zip pfsense-979f35f364fe1be6cbaeb38d881713d49683c739.tar.gz |
Check if file is tgz
Diffstat (limited to 'etc/rc.restore_full_backup')
-rwxr-xr-x | etc/rc.restore_full_backup | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/rc.restore_full_backup b/etc/rc.restore_full_backup index 92c1394..7930c73 100755 --- a/etc/rc.restore_full_backup +++ b/etc/rc.restore_full_backup @@ -1,10 +1,11 @@ #!/bin/sh -if [ -f $1 ]; then +echo "Checking..." +if [ `tar tzPf $1 /etc/rc 2>/dev/null` ]; then echo "One moment, restoring ${1}..." tar xzPfU $1 -C / echo "Restore of $1 complete." -else - echo "Could not locate ${1}. Available backups:" +else + echo "Could not locate backup ${1}. Available backups:" ls -lah /root | grep backup | more fi |