summaryrefslogtreecommitdiff
path: root/archiso/hooks
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-02-05 17:20:34 -0300
committerAaron Griffin <aaronmgriffin@gmail.com>2010-02-06 19:27:16 -0600
commit5f0614b42f3380d4f62061ee4a61cdb4dc9fa766 (patch)
tree6fbe1f2731b5dec8d93d66d2957fa41acbb95a68 /archiso/hooks
parent1baefc75a6bfe252c9f5b0014a73574afa4fc177 (diff)
downloadarchiso32-5f0614b42f3380d4f62061ee4a61cdb4dc9fa766.tar.xz
Remove special handling for vfat, all done via blkid
* Add archisodevide= boot option (suggested by brain0) (if declared use it, if not use /dev/archiso created via udev rule) * Removed redundant modprobe commands, (modules are loaded automatically on mount -t) * Other minor changes Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso/hooks')
-rw-r--r--archiso/hooks/archiso33
1 files changed, 11 insertions, 22 deletions
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index 5b102d7..434fd39 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -9,12 +9,13 @@ _mnt_bind()
# args: /path/to/image_file
_mnt_squashfs()
{
- /sbin/modprobe -q loop >/dev/null 2>&1
+ /sbin/modprobe -q loop > /dev/null 2>&1
img="${1}"
base_img="${img##*/}";
mnt="${2}"
+ # FIX: This options does not work (see FS#17182)
if [ "${copytoram}" = "y" ]; then
msg ":: Copying squashfs image to RAM"
/bin/cat ${img} > "/tmpfs/${base_img}"
@@ -56,30 +57,25 @@ run_hook ()
isomounts="/bootmnt/isomounts"
fi
+ if [ "x${archisodevice}" = "x" ]; then
+ archisodevice="/dev/archiso"
+ fi
+
msg -n ":: Mounting tmpfs, size=${tmpfs_size}..."
mount -t tmpfs -o "size=${tmpfs_size}" tmpfs /tmpfs
msg "done."
msg ":: Waiting for boot device..."
-
- /bin/mkdir -p /bootmnt
- while ! poll_device /dev/archiso 30; do
+ while ! poll_device ${archisodevice} 30; do
echo "ERROR: boot device didn't show up after 30 seconds..."
echo " Falling back to interactive prompt"
echo " You can try to fix the problem manually, log out when you are finished"
PS1="ramfs$ " /bin/sh -i
done
- FSTYPE=$(blkid -o value -s TYPE /dev/archiso 2>/dev/null)
+ FSTYPE=$(blkid -o value -s TYPE ${archisodevice} 2> /dev/null)
if [ -n "${FSTYPE}" ]; then
- if [ "${FSTYPE}" = "unknown" ]; then
- # First try mounting then with vfat, maybe someone put the image on
- # USB stick with unetbootin or similar. vfat is not detected by fstype.
- _FSTYPE="vfat"
- else
- _FSTYPE=$FSTYPE
- fi
- if mount -r -t "${_FSTYPE}" /dev/archiso /bootmnt >/dev/null 2>&1; then
+ if mount -r -t "${FSTYPE}" ${archisodevice} /bootmnt > /dev/null 2>&1; then
if [ -e "${isomounts}" ]; then
echo "SUCCESS: Mounted archiso volume successfully."
else
@@ -87,20 +83,13 @@ run_hook ()
exit 1
fi
else
- if [ "${FSTYPE}" = "unknown" ]; then
- echo "ERROR: Failed to mount /dev/archiso (FS is unknown and not vfat)."
- else
- echo "ERROR; Failed to mount /dev/archiso (FS is ${FSTYPE}."
- fi
+ echo "ERROR; Failed to mount ${archisodevice} (FS is ${FSTYPE})"
exit 1
fi
else
- echo "ERROR: /dev/archiso found, but the filesystem type is unknown."
+ echo "ERROR: ${archisodevice} found, but the filesystem type is unknown."
fi
- /sbin/modprobe -q squashfs >/dev/null 2>&1
- /sbin/modprobe -q aufs >/dev/null 2>&1
-
msg ":: Mounting root (aufs) filesystem"
/bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root
if [ $? -ne 0 ]; then