#!/bin/sh


OS=`cat /proc/sys/kernel/osrelease`

echo $OS

if [ ! -s "$(find /lib/modules/$OS -type f -name doc.o -print|head -1)" ]; then

cat <<-EOF

$DEVPATH/doc.o not found, did you install it yet?

You need to do something like:

        ./patch_linux linux_2_x-patch driver-patch
        cd /usr/src/linux
        make menuconfig # select M-Systems DOC in  block device s
        make dep
        make modules
        make modules_install

EOF
exit
fi

MKINITRD=$(pwd)/_mkinitrd-v24
cd /boot
[ -s initrd-${OS}.img ] && rm initrd-${OS}.img
$MKINITRD --preload doc initrd-${OS}.img ${OS}
