int unattended = 0;
struct keyvalue *unattendedkv = initkeyvalues();
int hardyn = 0;
+ char restore_file[STRING_SIZE];
setlocale (LC_ALL, "");
sethostname( SNAME , 10);
fprintf(flog, "unattended: Reading unattended.conf\n");
(void) readkeyvalues(unattendedkv, UNATTENDED_CONF);
+ findkey(unattendedkv, "RESTORE_FILE", restore_file);
}
/* Make the hdparms struct and print the contents.
goto EXIT;
}
+ /* Copy restore file from cdrom */
+ if (unattended && !strcmp(restore_file, "")) {
+ fprintf(flog, "unattended: Copy restore file\n");
+ snprintf(commandstring, STRING_SIZE,
+ "cp /cdrom/%s /harddisk/var/ipfire/backup", restore_file);
+ }
+
mysystem("umount /cdrom");
snprintf(commandstring, STRING_SIZE, "eject /dev/%s", sourcedrive);
mysystem(commandstring);