index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-01 10:59:11 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2010-03-01 10:59:11 -0300 |
commit | dee88bdd23a0fd7a7f6db74ec54497904140d6c9 (patch) | |
tree | c4de902365f890e307c75db36484635312e7b65a /archiso | |
parent | 260e2ee41250e9a81517aafe5d00292d8215dd2a (diff) |
-rw-r--r-- | archiso/hooks/archiso | 16 |
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index 1ac4d86..73f4df9 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -1,4 +1,13 @@ # args: source, mountpoint +_mnt_aufs() { + src="${1}" + mnt="${2}" + msg "::: Adding new aufs branch: ${src} to ${mnt}" + mkdir -p "${mnt}" + /bin/mount -t aufs -o remount,append:"${src}"=ro none "${mnt}" +} + +# args: source, mountpoint _mnt_bind() { src="${1}" mnt="${2}" @@ -16,16 +25,17 @@ _mnt_squashfs() { tmp_mnt="/tmpfs/mnt/${img_name}" if [ "${copytoram}" = "y" ]; then - msg ":: Copying squashfs image to RAM" + msg -n ":: Copying squashfs image to RAM" /bin/cp "${img}" "/tmpfs.sqfs/${img_fullname}" img="/tmpfs.sqfs/${img_fullname}" + msg "done." fi - msg "::: Adding new aufs branch: ${img_name}" mkdir -p "${tmp_mnt}" /bin/mount -r -t squashfs "${img}" "${tmp_mnt}" + if [ "/${mnt#/*/}" = "/" ]; then - /bin/mount -t aufs -o remount,append:"${tmp_mnt}"=ro none "${mnt}" + _mnt_aufs "${tmp_mnt}" "${mnt}" else _mnt_bind "${tmp_mnt}" "${mnt}" fi |