#!/bin/sh if [ ! "$*" ] then echo echo "Usage: " echo " update [kernel|initrd|pkglist]" exit fi if [ -f /etc/proc/boot ] then BOOT=`cat /etc/proc/boot` else BOOT="/dev/fd0" fi echo echo "Boot device: $BOOT" if [ "$BOOT" = "/dev/fd0" ] then echo -n "Please enter your boot/config floppy, then hit return: " read blah else PREFIX="/trinux" fi if mount -t vfat $BOOT /boot then if echo $* | grep "initrd" then INITRD=`cat /etc/tux/config/src/initrd` if [ "$INITRD" ] then echo "Updating initrd from $INITRD" cd /tmp if snarf $INITRD then echo -n "Are you sure? " read quest if [ "$quest" != "n" ] then echo "Deleting existing initrd.gz" cd /boot/$PREFIX ls -al rm initrd.gz mv /tmp/initrd.gz . fi fi else echo "No initrd found" fi fi sync echo "Unmounting $BOOT" cd /; umount /boot else echo "Unable to mount boot device!" fi