]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Changed alternative kernel to a package
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 1 Oct 2008 14:08:10 +0000 (16:08 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 1 Oct 2008 14:08:10 +0000 (16:08 +0200)
config/grub/grub.conf
config/rootfiles/packages/linux25 [moved from config/rootfiles/common/linux25 with 100% similarity]
config/rootfiles/updater/filelists/linux25 [deleted symlink]
config/rootfiles/updater/update.sh
lfs/initrd
lfs/linux25
src/install+setup/install/main.c
src/paks/linux25/install.sh [new file with mode: 0644]
src/paks/linux25/uninstall.sh [new file with mode: 0644]
src/paks/linux25/update.sh [new file with mode: 0644]

index c4b7e2adbe4b77e6d4d597a7982421feed8b19bc..886d6d77b01b8d3eacd1be336a9df4a8315d3054 100644 (file)
@@ -34,8 +34,3 @@ title IPFire (all storage drivers)
   kernel /vmlinuz-KVER-ipfire root=ROOT rootdelay=10 panic=10 MOUNT
   initrd /ipfirerd-KVER-emergency.img
   savedefault 5
   kernel /vmlinuz-KVER-ipfire root=ROOT rootdelay=10 panic=10 MOUNT
   initrd /ipfirerd-KVER-emergency.img
   savedefault 5
-title IPFire - experimental kernel-2.6.25.17 - no ipsec (vesafb 640x480)
-  root (hd0,0)
-  kernel /vmlinuz-2.6.25.17-ipfire root=ROOT rootdelay=10 panic=10 vga=785 MOUNT
-  initrd /ipfirerd-2.6.25.17.img
-  savedefault 6
diff --git a/config/rootfiles/updater/filelists/linux25 b/config/rootfiles/updater/filelists/linux25
deleted file mode 120000 (symlink)
index c9a54cd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../common/linux25
\ No newline at end of file
index 18593dcde80298aa688cd0a86ed5271da1b02f30..895272721740ee53bdff716d41de7c5d94e543a4 100755 (executable)
@@ -144,7 +144,6 @@ fi
 fi
 mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
 #mkinitcpio -k $KVER-ipfire-smp -g /boot/ipfirerd-$KVER-smp.img
 fi
 mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
 #mkinitcpio -k $KVER-ipfire-smp -g /boot/ipfirerd-$KVER-smp.img
-mkinitcpio -k 2.6.25.17-ipfire -g /boot/ipfirerd-2.6.25.17.img
 #
 # ReInstall grub
 #
 #
 # ReInstall grub
 #
index 114fab560c655ebf07bdd48881cf2445c93cd64e..b4d0e3bcfdb070b1777a77123cf413f81ca90ec9 100644 (file)
@@ -61,7 +61,6 @@ $(TARGET) :
        # make new dependencies 
        depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
        #depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp
        # make new dependencies 
        depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
        #depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp
-       depmod -a -F /boot/System.map-2.6.25.17-ipfire 2.6.25.17-ipfire
        
        cp -a /lib/modules/$(KVER)-ipfire/ /install/initrd/lib/modules/
        
        
        cp -a /lib/modules/$(KVER)-ipfire/ /install/initrd/lib/modules/
        
index b50aafeb0d1a6bef1d5c72b8ff063f3525b95748..d1d07defb16290dd4663f7793a28aacd438d1447 100644 (file)
@@ -42,6 +42,9 @@ else
        TARGET = $(DIR_INFO)/linux-$(VER)
 endif
 
        TARGET = $(DIR_INFO)/linux-$(VER)
 endif
 
+PROG   = linux25
+PAK_VER        = 1
+DEPS   = ""
 
 ###############################################################################
 # Top-level Rules
 
 ###############################################################################
 # Top-level Rules
@@ -75,6 +78,8 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
 
 md5 : $(subst %,%_MD5,$(objects))
 
 
 md5 : $(subst %,%_MD5,$(objects))
 
+dist:
+       @$(PAK)
 ###############################################################################
 # Downloading, checking, md5sum
 ###############################################################################
 ###############################################################################
 # Downloading, checking, md5sum
 ###############################################################################
index 6d6d12cf6ac01b68f91fd1c84276ced73b9b3604..910fd96daa26ad4f4cbae06545af196192eaf1d1 100644 (file)
@@ -455,10 +455,6 @@ int main(int argc, char *argv[])
                KERNEL_VERSION);
        mysystem(commandstring);
 */
                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");
 
        /* Rename uname */
        rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
@@ -532,9 +528,6 @@ int main(int argc, char *argv[])
 /*     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-%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);
 
 
        sprintf(string, "root=%s3", hdparams.devnode_part_run);
diff --git a/src/paks/linux25/install.sh b/src/paks/linux25/install.sh
new file mode 100644 (file)
index 0000000..0794b03
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+#
+KVER=2.6.25.17
+ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1`
+MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1`
+# Nur den letzten Parameter verwenden
+echo $MOUNT > /dev/null
+MOUNT=$_
+ENTRY=`grep "savedefault" /boot/grub/grub.conf | tail -n 1`
+# Nur den letzten Parameter verwenden
+echo $ENTRY > /dev/null
+let ENTRY=$_+1
+#
+# backup grub.conf
+#
+cp /boot/grub/grub.conf /boot/grub/grub-backup-$KVER.conf
+#
+# Add new Entry to grub.conf
+#
+echo "" >> /boot/grub/grub.conf
+echo "title IPFire alternative Kernel:$KVER" >> /boot/grub/grub.conf
+echo "  root (hd0,0)" >> /boot/grub/grub.conf
+echo "  kernel /vmlinuz-$KVER-ipfire root=$ROOT rootdelay=10 panic=10 $MOUNT" >> /boot/grub/grub.conf
+echo "  initrd /ipfirerd-$KVER.img" >> /boot/grub/grub.conf
+echo "  savedefault $ENTRY" >> /boot/grub/grub.conf
+#
+# Made initramdisk
+#
+mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
+#
+# ReInstall grub
+#
+grub-install --no-floppy ${ROOT::`expr length $ROOT`-1}
+#
+# Create new module depency
+#
+depmod -a $KVER-ipfire
+
diff --git a/src/paks/linux25/uninstall.sh b/src/paks/linux25/uninstall.sh
new file mode 100644 (file)
index 0000000..9a96762
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+remove_files
+mv -f /boot/grub/grub-backup-2.6.25.17.conf /boot/grub/grub.conf
diff --git a/src/paks/linux25/update.sh b/src/paks/linux25/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh