summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2011-06-05 21:54:22 +0200
committertnut <tnut at nutyx dot com>2011-06-05 21:54:22 +0200
commit7d75d7e8ad458f885c2cfce95c2c75587636fecc (patch)
treef15f8dcbf87e406cfe3df5e0fbefbd08970d5653 /base
parentb29c1a0f0e8c3c187320d9732a675c7c99bb2b52 (diff)
downloadnutyx-pakxe-7d75d7e8ad458f885c2cfce95c2c75587636fecc.tar.gz
nutyx-pakxe-7d75d7e8ad458f885c2cfce95c2c75587636fecc.tar.bz2
nutyx-pakxe-7d75d7e8ad458f885c2cfce95c2c75587636fecc.tar.xz
nutyx-pakxe-7d75d7e8ad458f885c2cfce95c2c75587636fecc.zip
kernel-39, ajout post-install
Diffstat (limited to 'base')
-rw-r--r--base/kernel-39/post-install81
1 files changed, 81 insertions, 0 deletions
diff --git a/base/kernel-39/post-install b/base/kernel-39/post-install
new file mode 100644
index 000000000..06f668534
--- /dev/null
+++ b/base/kernel-39/post-install
@@ -0,0 +1,81 @@
+version=2.6.39
+SCRIPT_VERSION="pakxe"
+SRC=/tmp/work
+WDIR=$SRC/nutyx-initrd
+ARCH=`uname -m`
+depmod $version
+if [ ! -d $SRC ]; then
+ mkdir -p $SRC
+fi
+tar -C $SRC -xf /boot/nutyx-initrd.* || exit 1
+cp /root/bin/install-${SCRIPT_VERSION}.ash \
+$WDIR/rootfs/install/
+for i in $WDIR/rootfs/install/setup-install \
+ $WDIR/rootfs/install/setup-mirroir
+do
+ sed -i "s|#INSTALL#|install-$SCRIPT_VERSION.ash|" $i || exit 1
+done
+
+for i in setup-grub functions setup-main main.txt
+do
+ sed -i "s|#VERSION#|$SCRIPT_VERSION|" $WDIR/rootfs/install/$i || exit 1
+done
+# Copie des modules kernels
+mkdir -p $WDIR/rootfs/lib/modules/$version/kernel/{drivers,fs}
+if [ -f /lib/modules/$version/kernel/crypto ]; then
+ cp -a /lib/modules/$version/kernel/crypto \
+ $WDIR/rootfs/lib/modules/$version/kernel/
+fi
+for i in ata block input ide hid message parport \
+serial misc net pcmcia scsi usb md rtc
+do
+ if [ -d /lib/modules/$version/kernel/drivers/$i ]; then
+ cp -a /lib/modules/$version/kernel/drivers/$i \
+ $WDIR/rootfs/lib/modules/$version/kernel/drivers/
+ fi
+done
+for i in wireless irda wan bonding \
+hamradio appletalk cxgb3 mlx4 sfc
+do
+ if [ -d $WDIR/rootfs/lib/modules/$version/kernel/drivers/net/$i ]; then
+ rm -r $WDIR/rootfs/lib/modules/$version/kernel/drivers/net/$i
+ fi
+done
+for i in fat ntfs smbfs vfat ext4 fs nfs nfs_common nfsd lockd
+do
+ if [ -d /lib/modules/$version/kernel/fs/$i ]; then
+ cp -a /lib/modules/$version/kernel/fs/$i \
+ $WDIR/rootfs/lib/modules/$version/kernel/fs/
+ fi
+done
+if [ -d /lib/modules/$version/kernel/net/sunrpc ]; then
+ mkdir -p $WDIR/rootfs/lib/modules/${version}/kernel/net/
+ cp -a /lib/modules/$version/kernel/net/sunrpc \
+ $WDIR/rootfs/lib/modules/$version/kernel/net/
+fi
+cp /root/bin/install-${SCRIPT_VERSION}.ash $WDIR/rootfs/install/
+
+cp -a /lib/modules/${version}/modules* \
+$WDIR/rootfs/lib/modules/${version}/
+
+# Compression des dossiers
+# for i in etc sbin var lib usr
+# do mksquashfs $WDIR/rootfs/$i $WDIR/rootfs/sqfs/$i
+# done
+# if [ "$ARCH" == "i686" ]; then
+# mkdir $WDIR/rootfs/libT
+# for i in libc.so.6 libc-2.13.so ld-2.13.so ld-linux.so.2
+# do mv $WDIR/rootfs/lib{,T}/$i
+# done
+# fi
+# for i in sbin var lib usr opt
+# do rm -r $WDIR/rootfs/$i
+# mkdir $WDIR/rootfs/$i
+# done
+# if [ "$ARCH" == "i686" ]; then
+# rm -r $WDIR/rootfs/lib
+# mv $WDIR/rootfs/lib{T,}
+# fi
+sh $WDIR/script/mkinitrd $WDIR
+cp $WDIR/iso/isolinux/initrd /boot/nutyx-initrd
+# rm -r $SRC