]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/install+setup/install/unattended.c
daq: Update to 2.0.4
[ipfire-2.x.git] / src / install+setup / install / unattended.c
index 754946aa22fee778205620b7e80de94fe6b01ccb..77e1eabbdc94f95d564173d14fa2504034992fd1 100644 (file)
@@ -131,7 +131,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
     /* set root password */
     fprintf(flog, "unattended: setting root password\n");
     snprintf(commandstring, STRING_SIZE,
-           "/sbin/chroot /harddisk /bin/sh -c \"echo 'root:%s' | /usr/sbin/chpasswd\"", root_password);
+           "/usr/sbin/chroot /harddisk /bin/sh -c \"echo 'root:%s' | /usr/sbin/chpasswd\"", root_password);
     if (mysystem(commandstring)) {
        errorbox("unattended: ERROR setting root password");
        return 0;
@@ -140,7 +140,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
     /* set admin password */
     fprintf(flog, "unattended: setting admin password\n");
     snprintf(commandstring, STRING_SIZE,
-           "/sbin/chroot /harddisk /usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", admin_password);
+           "/usr/sbin/chroot /harddisk /usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", admin_password);
     if (mysystem(commandstring)) {
        errorbox("unattended: ERROR setting admin password");
        return 0;
@@ -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 -xvz --preserve -f /harddisk/var/ipfire/%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");
            }