#! /bin/sh #---------------------------------------------------------------------------- # system-devices-mount-usb - mount usb device # # Copyright (c) 2003 Frank Meyer # # Creation: 14.11.2003 fm # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- echo mountpath=/usb case "$kernel_version" in 2.2.*) echo "Error: you need kernel 2.4.x to mount an USB device" /var/install/bin/anykey exit 1 ;; esac modprobe usb-storage >/dev/null 2>&1 insmod sd_mod >/dev/null 2>&1 insmod usb-uhci >/dev/null 2>&1 insmod usb-ohci >/dev/null 2>&1 insmod ehci-hcd >/dev/null 2>&1 sleep 3 mkdir $mountpath 2>/dev/null if /var/install/bin/ask "Mount USB device as raw device" then dev=/dev/sda else dev=/dev/sda1 fi mount -t vfat $dev $mountpath if [ $? = 0 ] then echo "mount successful, path is $mountpath" else echo "mount failed." fi echo /var/install/bin/anykey exit 0