9 for webfile
in HTTPFS FTPFS FETCH
11 local url
="$(eval echo \"\$\{${webfile}\}\")"
12 local extension
="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')"
16 case "${extension}" in
18 if [ "${extension}" = "iso" ]
20 mkdir
-p "${alt_mountpoint}"
21 dest
="${alt_mountpoint}"
23 local dest
="${mountpoint}/${LIVE_MEDIA_PATH}"
24 mount
-t ramfs ram
"${mountpoint}"
27 if [ "${webfile}" = "FETCH" ]
31 ip
="$(dirname $url | sed -e 's|tftp://||g' -e 's|/.*$||g')"
32 rfile
="$(echo $url | sed -e "s|tftp
://$ip||g
")"
33 lfile
="$(basename $url)"
34 log_begin_msg
"Trying tftp -g -b 10240 -r $rfile -l ${dest}/$lfile $ip"
35 tftp
-g -b 10240 -r $rfile -l ${dest}/$lfile $ip
39 log_begin_msg
"Trying wget ${url} -O ${dest}/$(basename ${url})"
40 wget
"${url}" -O "${dest}/$(basename ${url})"
44 log_begin_msg
"Trying to mount ${url} on ${dest}/$(basename ${url})"
45 if [ "${webfile}" = "FTPFS" ]
47 FUSE_MOUNT
="curlftpfs"
48 url
="$(dirname ${url})"
53 $FUSE_MOUNT "${url}" "${dest}"
54 ROOT_PID
="$(minips h -C "$FUSE_MOUNT" | { read x y ; echo "$x" ; } )"
56 [ ${?} -eq 0 ] && rc
=0
57 [ "${extension}" = "tgz" ] && live_dest
="ram"
58 if [ "${extension}" = "iso" ]
60 isoloop
=$
(setup_loop
"${dest}/$(basename "${url}")" "loop" "/sys/block/loop*" "" '')
61 mount
-t iso9660
"${isoloop}" "${mountpoint}"
68 log_begin_msg
"Unrecognized archive extension for ${url}"
76 if [ -d "${alt_mountpoint}" ]
78 umount
"${alt_mountpoint}"
79 rmdir "${alt_mountpoint}"
81 umount
"${mountpoint}"
82 elif [ "${webfile}" != "FETCH" ] ; then