Laedt die USB-Controller von allein...

Das soll die Probleme mit den USB-Tastaturen beheben.
Die mount*.sh-Scripts ordentlich formatiert.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@795 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-08-21 11:42:44 +00:00
parent 2894c0d6ad
commit 149a26a831
3 changed files with 46 additions and 43 deletions

View File

@@ -155,6 +155,10 @@ int main(int argc, char *argv[])
mysystem("/sbin/modprobe generic");
mysystem("/sbin/modprobe ide-cd");
mysystem("/sbin/modprobe ide-disk");
mysystem("/sbin/modprobe uhci_hcd");
mysystem("/sbin/modprobe ohci_hcd");
mysystem("/sbin/modprobe ehci_hcd");
mysystem("/sbin/modprobe ohci1394");
mysystem("/sbin/modprobe sd_mod");
mysystem("/sbin/modprobe sr_mod");
mysystem("/sbin/modprobe usb-storage");

View File

@@ -6,50 +6,49 @@ echo "Scanning for possible destination drives"
echo "--> IDE"
for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - skipping"
echo "${DEVICE} is source drive - SKIP"
continue
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo "${DEVICE} - yes, it is our destination"
exit 0
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo "${DEVICE} - yes, it is our destination"
exit 0
fi
done
# scan USB/SCSI devices
echo "--> USB/SCSI"
for DEVICE in $(kudzu -qps -t 30 -c HD -b SCSI | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - skipping"
echo "${DEVICE} is source drive - SKIP"
continue
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo "${DEVICE} - yes, it is our destination"
exit 1
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo "${DEVICE} - yes, it is our destination"
exit 1
fi
done
# scan RAID devices
echo "--> RAID"
for DEVICE in $(kudzu -qps -t 30 -c HD -b RAID | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}p1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n "---> $DEVICE"
mount /dev/${DEVICE}p1 /harddisk 2> /dev/null
if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
umount /harddisk 2> /dev/null
echo "${DEVICE} is source drive - skipping"
echo " is source drive"
echo "${DEVICE} is source drive - SKIP"
continue
else
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo "${DEVICE} - yes, it is our destination"
echo "${DEVICE} - yes, it is our destination"
exit 2
fi
done

View File

@@ -4,32 +4,32 @@ echo "Scanning source media"
# scan CDROM devices
for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE} /cdrom 2> /dev/null
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found Sources in ${DEVICE}"
else
echo "Found no Sources in ${DEVICE} skipping"
fi
umount /cdrom 2> /dev/null
mount /dev/${DEVICE} /cdrom 2> /dev/null
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found tarball on ${DEVICE}"
else
echo "Found no tarballs on ${DEVICE} - SKIP"
fi
umount /cdrom 2> /dev/null
done
# scan HD device (usb sticks, etc.)
for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE}1 /cdrom 2> /dev/null
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found Sources in ${DEVICE}"
else
umount /cdrom 2> /dev/null
echo "Found no Sources in ${DEVICE} skipping"
fi
umount /cdrom 2> /dev/null
mount /dev/${DEVICE}1 /cdrom 2> /dev/null
if [ -n "$(ls /cdrom/ipfire-*.tbz2 2>/dev/null)" ]; then
echo -n ${DEVICE} > /tmp/source_device
echo "Found tarball on ${DEVICE}"
else
umount /cdrom 2> /dev/null
echo "Found no tarballs on ${DEVICE} - SKIP"
fi
umount /cdrom 2> /dev/null
done
if [ -e /tmp/source_device ]; then
mount /dev/$(cat /tmp/source_device) /cdrom 2> /dev/null
exit 0
mount /dev/$(cat /tmp/source_device) /cdrom 2> /dev/null
exit 0
else
exit 10
exit 10
fi