- /*
- Allow the user to restore their configuration from a floppy.
- It uses tar. If the tar fails for any reason, show user an
- error and go back to the restore/skip question. This gives
- the user the chance to have another go. */
-
+ /* Build cache lang file */
+ snprintf(commandstring, STRING_SIZE, "/bin/chroot /harddisk /usr/bin/perl -e \"require '" CONFIG_ROOT "/lang.pl'; &Lang::BuildCacheLang\"");
+ if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_LANG_CACHE]))
+ {
+ errorbox(ctr[TR_UNABLE_TO_INSTALL_LANG_CACHE]);
+ goto EXIT;
+ }
+
+ if (raid_disk)
+ sprintf(string, "root=%sp3", hdparams.devnode);
+ else
+ sprintf(string, "root=%s3", hdparams.devnode);
+ replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
+ mysystem( "sed -i \"s|KVERSION|$(/bin/uname -r)|\" /harddisk/boot/grub/grub.conf" );
+
+ replace( "/harddisk/boot/grub/grubbatch", "DEVICE", hdparams.devnode);
+ /* restore permissions */
+ chmod("/harddisk/boot/grub/grubbatch", S_IXUSR | S_IRUSR | S_IXGRP | S_IRGRP | S_IXOTH | S_IROTH);
+
+ /* mount proc filesystem */
+ mysystem("mkdir /harddisk/proc");
+ mysystem("/bin/mount -t proc none /harddisk/proc");
+ mysystem("/bin/mount --bind /dev /harddisk/dev");
+
+ snprintf(commandstring, STRING_SIZE,
+ "/bin/chroot /harddisk /boot/grub/grubbatch");
+ if (runcommandwithstatus(commandstring, ctr[TR_INSTALLING_GRUB])) {
+ errorbox(ctr[TR_UNABLE_TO_INSTALL_GRUB]);
+ goto EXIT;
+ }
+
+ mysystem("umount /harddisk/proc/");
+ mysystem("umount /harddisk/dev/");
+