echo "/root/usr/lib" >> /etc/ld.so.conf
mountpoint="/live/image"
+ext_mountpoint="/ext_volume"
LIVE_MEDIA_PATH="live"
root_persistence="live-rw"
do_httpmount ()
{
rc=1
- dest="${mountpoint}/${LIVE_MEDIA_PATH}"
- mount -t ramfs ram "${mountpoint}"
- mkdir -p "${dest}"
for webfile in HTTPFS FTPFS FETCH
do
- url="$(eval echo \"\$\{${webfile}\}\")"
- extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')"
+ local url="$(eval echo \"\$\{${webfile}\}\")"
+ local extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')"
if [ -n "$url" ]
then
case "${extension}" in
- squashfs|tgz|tar)
+ iso|squashfs|tgz|tar)
+ if [ "${extension}" = "iso" ]
+ then
+ mkdir -p "${ext_mountpoint}"
+ dest="${ext_mountpoint}"
+ else
+ local dest="${mountpoint}/${LIVE_MEDIA_PATH}"
+ mount -t ramfs ram "${mountpoint}"
+ mkdir -p "${dest}"
+ fi
if [ "${webfile}" = "FETCH" ]
then
case "$url" in
fi
[ ${?} -eq 0 ] && rc=0
[ "${extension}" = "tgz" ] && live_dest="ram"
+ if [ "${extension}" = "iso" ]
+ then
+ isoloop=$(setup_loop "${dest}/$(basename "${url}")" "loop" "/sys/block/loop*" "" '')
+ mount -t iso9660 "${isoloop}" "${mountpoint}"
+ rc=${?}
+ fi
break
;;
if [ ${rc} != 0 ]
then
+ if [ -d "${ext_mountpoint}" ]
+ then
+ umount "${ext_mountpoint}"
+ rmdir "${ext_mountpoint}"
+ fi
umount "${mountpoint}"
elif [ "${webfile}" != "FETCH" ] ; then
NETBOOT="${webfile}"