[Lunar-commits] <lunar-iso> lunar-install: Generate md5sum file for pre-compiled kernel

Stefan Wold ratler at lunar-linux.org
Sun Mar 14 13:07:13 CET 2010


commit 5ab6caa79d40b7f051b30369c3dcf7eb481d452a
Author: Stefan Wold <ratler at lunar-linux.org>
Date:   Sun Mar 14 13:07:13 2010 +0100

    lunar-install: Generate md5sum file for pre-compiled kernel
---
 lunar-install/sbin/lunar-install |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/lunar-install/sbin/lunar-install b/lunar-install/sbin/lunar-install
index 67f74c5..805ea9f 100755
--- a/lunar-install/sbin/lunar-install
+++ b/lunar-install/sbin/lunar-install
@@ -6,7 +6,7 @@
 # portions Copyright 2002 by rodzilla                       #
 # portions Copyright 2003-2004 by tchan, kc8apf             #
 # portions Copyright 2004-2007 by Auke Kok                  #
-# portions Copyright 2008 by Stefan Wold                    #
+# portions Copyright 2008-2010 by Stefan Wold               #
 #                                                           #
 #############################################################
 #                                                           #
@@ -67,6 +67,7 @@ chroot_run()
 	if [ -n "$USE_SWAP" ]; then
 		chroot $TARGET swapon -a
 	fi
+	clear
 	chroot $TARGET $1 $2 $3 $4 $5 $6 $7 $8 $9
 	RESULT=$?
 	if [ -n "$USE_SWAP" ]; then
@@ -1384,10 +1385,16 @@ install_kernels()
 					cd $TARGET && tar xjf /kernels/$CCOMMAND.tar.bz2
 					ln -s /usr/src/linux-$CCOMMAND $TARGET/usr/src/linux
 
-                    # Register the kernel module as installed
-                    if ! grep -q "^linux-2.6" $TARGET/var/state/lunar/packages; then
-                      echo "linux-2.6:%DATE%:installed:$CCOMMAND:37000KB" >> $TARGET/var/state/lunar/packages
-                    fi
+					# Register the kernel module as installed
+					if ! grep -q "^linux-2.6" $TARGET/var/state/lunar/packages; then
+						echo "linux-2.6:%DATE%:installed:$CCOMMAND:37000KB" >> $TARGET/var/state/lunar/packages
+					fi
+
+					# Generate kernel install log
+					tar -tf /kernels/$CCOMMAND.tar.bz2 | sed '/^usr\/src/d;s:^:/:g' >> $TARGET/var/log/lunar/install/linux-2.6-${CCOMMAND} &> /dev/null
+
+					# Generate kernel md5sum log
+					cat $TARGET/var/log/lunar/install/linux-2.6-${CCOMMAND} | xargs -i md5sum {} >> $TARGET/var/log/lunar/install/linux-2.6-${CCOMMAND} 2> /dev/null
 
 					# let the plugin code handle the hard work
 					chroot_run lsh update_bootloader $CCOMMAND ${CCOMMAND:0:15}


More information about the Lunar-commits mailing list