Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv14637
Modified Files:
install-on-usb
Log Message:
Added checks for devfs
Index: install-on-usb
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/install-on-usb,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- install-on-usb 30 Sep 2003 19:50:41 -0000 1.5
+++ install-on-usb 28 Oct 2003 16:36:32 -0000 1.6
@@ -97,6 +97,13 @@
kernel /boot/vmlinuz ro root=/dev/ram0 init=/linuxrc ramdisk_blocksize=4096 vga=ask
initrd /boot/initrd.gz
EOF
+ if [ -f ./tmp/mnt2/boot/memtest ]; then
+ cat >> ./tmp/mnt2/boot/grub/grub.conf <<-EOF
+ title Memtest86
+ root (hd0,$2)
+ kernel /boot/memtest
+ EOF
+ fi
pushd ./tmp/mnt2/boot/grub > /dev/null
rm -f menu.lst
ln -s grub.conf menu.lst
@@ -129,10 +136,23 @@
# echo -n "$(scsiDevFromScsiUsb $device) "
# done
echo
- read -p "Enter device name (the partition) of USB device (i.e. /dev/sda1) -> " PARTITION
+ read -p "Enter PARTITION name on USB device (i.e. /dev/sda1) -> " PARTITION
+ read -p "Enter DEVICE name of USB device (i.e. /dev/sda) -> " DEVICE
- DEVICE=${PARTITION%%[0-9]}
- GRUBPART=$(expr ${PARTITION##/dev/[hs]d[a-z]} - 1)
+
+ for device in "$PARTITION" "$DEVICE"
+ do
+ if [ -L $device ]; then
+ echo "If you are using devfs, you must supply the full device, not the link."
+ exit
+ fi
+ if [ ! -b $device ]; then
+ echo "Cannot find: $device"
+ exit
+ fi
+ done
+
+ GRUBPART=$(expr $(basename ${PARTITION} | sed -e 's/^part//' -e 's/^[hs]d[a-z]//') - 1)
echo
echo "Please make sure the partition type is 'Linux' (83) "
|