Support mutli-arch disks by specifying the arch
Specify the arch on the command line and mountpoints so that we can support mutli-arch livecds Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
09435a2652
commit
88ae858f51
@ -27,6 +27,10 @@ _mnt_squashfs()
|
|||||||
|
|
||||||
run_hook ()
|
run_hook ()
|
||||||
{
|
{
|
||||||
|
if [ "x${arch}" = "x" ]; then
|
||||||
|
arch="$(uname -m)"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "x${ramdisk_size}" = "x" ]; then
|
if [ "x${ramdisk_size}" = "x" ]; then
|
||||||
ramdisk_size="75%"
|
ramdisk_size="75%"
|
||||||
fi
|
fi
|
||||||
@ -100,10 +104,12 @@ run_hook ()
|
|||||||
export LOOP_NUM="0"
|
export LOOP_NUM="0"
|
||||||
if [ -e "/mounts" ]; then
|
if [ -e "/mounts" ]; then
|
||||||
msg ":: Mounting images"
|
msg ":: Mounting images"
|
||||||
while read img 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 #)
|
||||||
[ "${img#"#"}" != "${img}" ] && continue
|
[ "${img#"#"}" != "${img}" ] && continue
|
||||||
|
|
||||||
|
[ "$imgarch" != "$arch" ] && continue
|
||||||
|
|
||||||
if [ "${type}" = "bind" ]; then
|
if [ "${type}" = "bind" ]; then
|
||||||
_mnt_bind ${img} ${mountpoint}
|
_mnt_bind ${img} ${mountpoint}
|
||||||
elif [ "${type}" = "squashfs" ]; then
|
elif [ "${type}" = "squashfs" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user