]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Merge branch 'kernel25'
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 29 Sep 2008 20:21:52 +0000 (22:21 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 29 Sep 2008 20:21:52 +0000 (22:21 +0200)
1  2 
src/install+setup/install/main.c

index 418000477eb755bf145912a205e7cb221449e6b7,0d596a56fb488e0ad9305e025d13caaa708f0545..d4f31b38b562e33a83384ca18ffae684be421228
@@@ -66,7 -66,6 +66,7 @@@ int main(int argc, char *argv[]
        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.
                KERNEL_VERSION);
        mysystem(commandstring);
  */
+       snprintf(commandstring, STRING_SIZE, 
+               "/bin/touch /harddisk/lib/modules/2.6.25.17-ipfire/modules.dep");
+       mysystem(commandstring);
        /* Rename uname */
        rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
  
  /*    snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s-smp.img -k %s-ipfire-smp", KERNEL_VERSION, KERNEL_VERSION );
        runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
  */
+       snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-2.6.25.17.img -k 2.6.25.17-ipfire");
+       runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
        sprintf(string, "root=%s3", hdparams.devnode_part_run);
        replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
        mysystem("ln -s grub.conf /harddisk/boot/grub/menu.lst");
                goto EXIT;
        }
        
 +      /* Copy restore file from cdrom */
 +      if (unattended && (strlen(restore_file) > 0)) {
 +              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);