Change mounts file to isomounts
Also check for this file instead of the root image on mount, to make images more generic Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
88ae858f51
commit
901526970e
@ -53,7 +53,7 @@ run_hook ()
|
|||||||
msg ":: Scanning cd drives..."
|
msg ":: Scanning cd drives..."
|
||||||
for cdrom in /dev/hd[a-z] /dev/sr[0-9]* /dev/scd[a-z] /dev/sg[0-9]*; do
|
for cdrom in /dev/hd[a-z] /dev/sr[0-9]* /dev/scd[a-z] /dev/sg[0-9]*; do
|
||||||
if mount -r -t iso9660 "${cdrom}" ${bootmnt} >/dev/null 2>&1; then
|
if mount -r -t iso9660 "${cdrom}" ${bootmnt} >/dev/null 2>&1; then
|
||||||
if [ -e "${bootmnt}/root-image.sqfs" ]; then
|
if [ -e "${bootmnt}/isomounts" ]; then
|
||||||
found=1
|
found=1
|
||||||
msg "${cdrom}"
|
msg "${cdrom}"
|
||||||
break
|
break
|
||||||
@ -69,7 +69,7 @@ run_hook ()
|
|||||||
for usb in /dev/sd[a-z][0-9]; do
|
for usb in /dev/sd[a-z][0-9]; do
|
||||||
if mount -r -t vfat "${usb}" ${bootmnt} >/dev/null 2>&1 ||\
|
if mount -r -t vfat "${usb}" ${bootmnt} >/dev/null 2>&1 ||\
|
||||||
mount -r -t ext2 "${usb}" ${bootmnt} >/dev/null 2>&1; then
|
mount -r -t ext2 "${usb}" ${bootmnt} >/dev/null 2>&1; then
|
||||||
if [ -e "${bootmnt}/root-image.sqfs" ]; then
|
if [ -e "${bootmnt}/isomounts" ]; then
|
||||||
found=1
|
found=1
|
||||||
msg "${usb}"
|
msg "${usb}"
|
||||||
break
|
break
|
||||||
@ -102,7 +102,7 @@ run_hook ()
|
|||||||
/bin/mount -t unionfs -o dirs=/tmpfs=rw none /real_root
|
/bin/mount -t unionfs -o dirs=/tmpfs=rw none /real_root
|
||||||
|
|
||||||
export LOOP_NUM="0"
|
export LOOP_NUM="0"
|
||||||
if [ -e "/mounts" ]; then
|
if [ -e "/isomounts" ]; then
|
||||||
msg ":: Mounting images"
|
msg ":: Mounting images"
|
||||||
while read img imgarch mountpoint type; do
|
while read img imgarch mountpoint type; do
|
||||||
# check if this line is a comment (starts with #)
|
# check if this line is a comment (starts with #)
|
||||||
@ -115,7 +115,7 @@ run_hook ()
|
|||||||
elif [ "${type}" = "squashfs" ]; then
|
elif [ "${type}" = "squashfs" ]; then
|
||||||
_mnt_squashfs "${img}"
|
_mnt_squashfs "${img}"
|
||||||
fi
|
fi
|
||||||
done < /mounts
|
done < /isomounts
|
||||||
else
|
else
|
||||||
msg ":: No mountable images found"
|
msg ":: No mountable images found"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user