index : archiso32 | |
Archlinux32 iso tools | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-01 10:39:01 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-01 10:39:01 -0300 |
commit | c65f463ce388b0a93fafbca5227b427c41e00a6b (patch) | |
tree | a5f4ad2ff5a3887738f89b20cc442d42e0673862 /archiso/hooks | |
parent | 1a80486e954bd86ffa73ea4e1b6fe6e80d03f75c (diff) |
-rw-r--r-- | archiso/hooks/archiso | 27 |
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index 9997b38..1ac4d86 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -15,6 +15,12 @@ _mnt_squashfs() { img_name="${img_fullname%.*}" tmp_mnt="/tmpfs/mnt/${img_name}" + if [ "${copytoram}" = "y" ]; then + msg ":: Copying squashfs image to RAM" + /bin/cp "${img}" "/tmpfs.sqfs/${img_fullname}" + img="/tmpfs.sqfs/${img_fullname}" + fi + msg "::: Adding new aufs branch: ${img_name}" mkdir -p "${tmp_mnt}" /bin/mount -r -t squashfs "${img}" "${tmp_mnt}" @@ -34,6 +40,10 @@ run_hook () { tmpfs_size="75%" fi + if [ "x${tmpfs_sqfs_size}" = "x" ]; then + tmpfs_sqfs_size="75%" + fi + if [ "x${isomounts}" != "x" ]; then isomounts="/bootmnt/${isomounts}" else @@ -55,6 +65,12 @@ archiso_mount_handler() { mount -t tmpfs -o "size=${tmpfs_size}" tmpfs /tmpfs msg "done." + if [ "${copytoram}" = "y" ]; then + msg -n ":: Mounting tmpfs (for squashfs), size=${tmpfs_sqfs_size}..." + mount -t tmpfs -o "size=${tmpfs_sqfs_size}" tmpfs /tmpfs.sqfs + msg "done." + fi + msg ":: Waiting for boot device..." while ! poll_device ${archisodevice} 30; do echo "ERROR: boot device didn't show up after 30 seconds..." @@ -114,13 +130,14 @@ archiso_mount_handler() { # Bind our bootmnt dir into the live system _mnt_bind /bootmnt "${newroot}/bootmnt" - if [ "${FSTYPE}" = "iso9660" -o "${FSTYPE}" = "udf" ]; then - if [ -d /proc/sys/dev/cdrom ]; then - echo 0 > /proc/sys/dev/cdrom/lock - echo 0 > /proc/sys/dev/cdrom/autoeject + if [ "${copytoram}" != "y" ]; then + if [ "${FSTYPE}" = "iso9660" ] || [ "${FSTYPE}" = "udf" ]; then + if [ -d /proc/sys/dev/cdrom ]; then + echo 0 > /proc/sys/dev/cdrom/lock + echo 0 > /proc/sys/dev/cdrom/autoeject + fi fi fi - } # vim:ft=sh:ts=4:sw=4:et: |