]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Neue Mount Skripte fuer den Installer - Status untested
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 21 Aug 2007 08:36:40 +0000 (08:36 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 21 Aug 2007 08:36:40 +0000 (08:36 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@793 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/install+setup/install/mountdest.sh
src/install+setup/install/mountsource.sh

index 330e5c79a532b0ed2089bfa4686ed0cb8036bc41..3c56b8ccc8f573ae70ae64ac87222c2a29702d86 100644 (file)
@@ -7,9 +7,9 @@ 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 [ -e /harddisk/ipfire-*.tbz2 ]; then
+    if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
                        umount /harddisk 2> /dev/null
-                       echo " is source drive"
+                       echo "${DEVICE} is source drive - skipping"
                        continue
     else
        umount /harddisk 2> /dev/null
@@ -19,14 +19,26 @@ for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 |
                fi
 done
 
+    mount /dev/${DEVICE}1 /cdrom 2> /dev/null
+    if [  ]; 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
+
+
+
 # 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"
                mount /dev/${DEVICE}1 /harddisk 2> /dev/null
-    if [ -e /harddisk/ipfire-*.tbz2 ]; then
+    if [ -n "$(ls /harddisk/ipfire-*.tbz2 2>/dev/null)" ]; then
                        umount /harddisk 2> /dev/null
-                       echo " is source drive"
+                       echo "${DEVICE} is source drive - skipping"
                        continue
     else
        umount /harddisk 2> /dev/null
@@ -41,8 +53,9 @@ 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 [ -e /harddisk/ipfire-*.tbz2 ]; then
+    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"
                        continue
     else
index a416299feb3add491191093b1eeb929bb99bd33c..d46a7e49314b9ed70df6f5b28a5d11835961137b 100644 (file)
@@ -5,9 +5,11 @@ 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 [ -e /cdrom/ipfire-*.tbz2 ]; then
-                       echo -n ${DEVICE} > /tmp/source_device
-                       exit 0
+    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
 done
@@ -15,11 +17,19 @@ 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 [ -e /cdrom/ipfire-*.tbz2 ]; then
-                       echo -n ${DEVICE}1 > /tmp/source_device
-                       exit 1
+    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
 done
 
-exit 10
+if [ -e /tmp/source_device ]; then
+  mount /dev/$(cat /tmp/source_device) /cdrom 2> /dev/null
+  exit 0
+else
+  exit 10
+fi