]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - lfs/flash-images
Merge commit 'ms/openvpn-n2n' into next
[people/teissler/ipfire-2.x.git] / lfs / flash-images
index 5eff02a8242b111fa401db9f3df0f84fce8e67d7..99ed45f28457f1683098310af79da3dcbc9d742c 100644 (file)
@@ -94,30 +94,16 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chroot $(MNThdd) /usr/bin/perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
        sed -i -e "s|MOUNT|ro|g" $(MNThdd)/boot/grub/grub.conf
        sed -i -e "s|KVER|$(KVER)|g" $(MNThdd)/boot/grub/grub.conf
-       sed -i -e "s|ROOT|/dev/sda3|g" $(MNThdd)/boot/grub/grub.conf
+       sed -i -e "s|ROOT|UUID=$$(blkid -sUUID $(IMGroot) | cut -d'"' -f2)|g" $(MNThdd)/boot/grub/grub.conf
        ln -s grub.conf $(MNThdd)/boot/grub/menu.lst
+       sed -i -e "s|DEVICE1|UUID=$$(blkid -sUUID $(IMGboot) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
        sed -i -e "s|DEVICE2|#DEVICE2|g" $(MNThdd)/etc/fstab
-       sed -i -e "s|DEVICE|/dev/sda|g" $(MNThdd)/etc/fstab
+       sed -i -e "s|DEVICE3|UUID=$$(blkid -sUUID $(IMGroot) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
+       sed -i -e "s|DEVICE4|UUID=$$(blkid -sUUID $(IMGvar) | cut -d'"' -f2)|g" $(MNThdd)/etc/fstab
        sed -i -e "s|FSTYPE|ext2|g" $(MNThdd)/etc/fstab
-       cp -f $(MNThdd)/etc/mkinitcpio.conf $(MNThdd)/etc/mkinitcpio.conf.org
-       sed -i -e "s| autodetect | |g" $(MNThdd)/etc/mkinitcpio.conf
-       chroot $(MNThdd) /sbin/mkinitcpio -g /boot/ipfirerd-$(KVER)-emergency.img -k $(KVER)-ipfire 
-       cp -f $(MNThdd)/etc/mkinitcpio.conf.org $(MNThdd)/etc/mkinitcpio.conf
-       ln -s ipfirerd-$(KVER)-emergency.img $(MNThdd)/boot/ipfirerd-$(KVER).img
 
        # Copy grub files manually
        cp -f $(MNThdd)/usr/share/grub/i386-pc/* $(MNThdd)/boot/grub/
-       #chroot $(MNThdd) /usr/sbin/grub-set-default 0
-
-       # Create a script for rebuild-initrd and setup
-       echo "#!/bin/bash"                                   > $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-       echo "/bin/rm -f /boot/ipfirerd-$(KVER).img"        >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-       echo "/usr/local/bin/rebuild-initrd"                >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-       echo "/usr/local/sbin/setup /dev/null INSTALL"      >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-       echo "rm -f /etc/rc.d/rcsysinit.d/S75firstsetup \\" >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-       echo "&& /sbin/reboot"                              >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
-
-       chmod +x $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
 
        # Unmount
        umount $(MNThdd)/proc
@@ -159,6 +145,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        sed -i -e "s|#terminal|terminal|g" $(MNThdd)/boot/grub/grub.conf
        sed -i -e "s| panic=10 | console=ttyS0,38400n8 panic=10 |g" $(MNThdd)/boot/grub/grub.conf
 
+       sed -i -e "s|1:2345:respawn:|#1:2345:respawn:|g" $(MNThdd)/etc/inittab
+       sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" $(MNThdd)/etc/inittab
+       sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" $(MNThdd)/etc/inittab
+       sed -i -e "s|4:2345:respawn:|#4:2345:respawn:|g" $(MNThdd)/etc/inittab
+       sed -i -e "s|5:2345:respawn:|#5:2345:respawn:|g" $(MNThdd)/etc/inittab
+       sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" $(MNThdd)/etc/inittab
        sed -i -e "s|#7:2345:respawn:|7:2345:respawn:|g" $(MNThdd)/etc/inittab
 
        umount $(MNThdd)/boot
@@ -188,3 +180,4 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        gzip -f9 $(IMGinsts)
 
        rm -rf $(MNThdd) $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar)
+