Fix unattended restore of backupiso cd.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 26 Jan 2011 16:42:09 +0000 (17:42 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 26 Jan 2011 16:42:09 +0000 (17:42 +0100)
src/install+setup/install/unattended.c

index 3e2f3f0..77e1eab 100644 (file)
@@ -150,7 +150,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
        if (strlen(restore_file) > 0) {
                fprintf(flog, "unattended: Restoring Backup\n");
            snprintf(commandstring, STRING_SIZE,
-                   "cd /harddisk && /bin/tar -xvzp -f /harddisk/var/ipfire/backup/%s", restore_file);
+                   "/usr/sbin/chroot /harddisk /bin/tar -xvzp -f /var/ipfire/backup/%s -C /", restore_file);
            if (mysystem(commandstring)) {
                errorbox("unattended: ERROR restoring backup");
            }