From 8fb6b2d3d410ad2badf0c99ed7a66b698aafaa17 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sat, 7 Jan 2006 08:58:44 +0000 Subject: slugos: Major rename of common SlugOS files and directories from openslug to slugos. --- .../openslug-init/openslug-init-0.10/update-kernel | 82 ---------------------- 1 file changed, 82 deletions(-) delete mode 100755 packages/openslug-init/openslug-init-0.10/update-kernel (limited to 'packages/openslug-init/openslug-init-0.10/update-kernel') diff --git a/packages/openslug-init/openslug-init-0.10/update-kernel b/packages/openslug-init/openslug-init-0.10/update-kernel deleted file mode 100755 index 796d45e953..0000000000 --- a/packages/openslug-init/openslug-init-0.10/update-kernel +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh - -if [ ! -f /boot/zImage ] ; then - echo "Cannot find kernel to flash in /boot/zImage" - exit 1 -fi - -/bin/rm -f /boot/zImage-partition - -if [ -f /boot/zImage-partition ] ; then - echo "Unable to remove kernel partition file" - exit 1 -fi - -echo "Creating kernel partition header" -/usr/sbin/kern_header /boot/zImage /boot/zImage-partition - -if [ ! -f /boot/zImage-partition ] ; then - echo "Unable to create kernel partition header" - exit 1 -fi - -echo "Creating kernel partition file" -/bin/cat /boot/zImage >> /boot/zImage-partition - -/bin/rm -f /boot/zImage-partition.old - -if [ -f /boot/zImage-partition.old ] ; then - echo "Unable to remove old kernel partition file" - exit 1 -fi - -echo "Saving old kernel partition" -cat /dev/mtdblock2 > /boot/zImage-partition.old - -if [ ! -f /boot/zImage-partition.old ] ; then - echo "Unable to create old kernel partition file" - exit 1 -fi - -/bin/ls -l /boot/zImage /boot/zImage-partition /boot/zImage-partition.old - -echo "Flashing new kernel partition" -cat /boot/zImage-partition > /dev/mtdblock2 - -/bin/rm -f /boot/zImage-partition.verify - -if [ -f /boot/zImage-partition.verify ] ; then - echo "Unable to remove kernel partition verify file" - exit 1 -fi - -echo "Verifing new kernel partition" -/bin/dd if=/dev/mtd2 of=/boot/zImage-partition.verify bs=1 \ - count=`/bin/dd if=/dev/mtd2 bs=4 count=1 2>/dev/null | \ - /usr/bin/hexdump -n 6 -e '"%02d"'` 2>/dev/null - -if [ ! -f /boot/zImage-partition.verify ] ; then - echo "Unable to create kernel partition verify file" - exit 1 -fi - -if cmp /boot/zImage-partition /boot/zImage-partition.verify ; then - echo "Verification successful" - /bin/rm -f /boot/zImage-partition.verify - /bin/rm -f /boot/zImage-partition - /bin/rm -f /boot/zImage-partition.old - exit 0 -fi - -echo "VERIFICATION FAILED - DANGER DANGER DANGER" - -echo "You must now manually reflash the new kernel," -echo "or reflash the old kernel back again." -echo "The kernel partition is /dev/mtdblock2" -echo "The old kernel partition is in /boot/zImage-partition.old" -echo "The present partition contents are in /boot/zImage-partition.verify" -echo "The new kernel partition is in /boot/zImage-partition" - -exit 1 - - -- cgit v1.2.3