From 49336376d52f422a1944cfd51ed1335876358991 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Tue, 21 Jun 2005 21:21:39 +0000 Subject: [PATCH] - if using it to boot, mount the flash device at /tmp/ instead of trying to be clever and temporarily mounting it at /usr. Being clever confuses "mount /usr" in BootServerRequest.py, causing it to re-mount the FAT filesystem a third time on top of /usr instead of leaving it alone as already mounted. --- conf_files/pl_sysinit | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conf_files/pl_sysinit b/conf_files/pl_sysinit index 9ec956f..fa5810e 100755 --- a/conf_files/pl_sysinit +++ b/conf_files/pl_sysinit @@ -34,17 +34,18 @@ for device in /sys/block/*; do partitions=$(/bin/awk "\$4 ~ /${device}[0-9]*/ { print \$4 }" /proc/partitions) for partition in $partitions ; do echo "pl_sysinit: checking $partition for iso image" - if /bin/mount -o ro -t msdos,ext2 /dev/$partition /usr 2>&1 > /dev/null ; then + mkdir -p /tmp/$partition + if /bin/mount -o ro -t msdos,ext2 /dev/$partition /tmp/$partition 2>&1 > /dev/null ; then # Look for the first ISO image - for iso in /usr/*.iso ; do + for iso in /tmp/$partition/*.iso ; do if /sbin/losetup /dev/loop0 $iso ; then - echo "pl_sysinit: using $iso on $partition" + echo "pl_sysinit: using $(basename $iso) on $partition" device="loop0" break fi done if [ "$device" != "loop0" ] ; then - /bin/umount /usr 2>&1 > /dev/null + /bin/umount /tmp/$partition 2>&1 > /dev/null fi fi done -- 2.43.0