echo "/root/usr/lib" >> /etc/ld.so.conf
mountpoint="/live/image"
+alt_mountpoint="/media"
LIVE_MEDIA_PATH="live"
root_persistence="live-rw"
NOFASTBOOT="Yes"
NOFSTAB="Yes"
NOHOSTS="Yes"
- NOLOCALES="Yes"
NONETWORKING="Yes"
NOTIMEZONE="Yes"
NOXAUTOCONFIG="Yes"
NOXAUTOLOGIN="Yes"
- export NOACCESSIBILITY NOAPTCDROM NOAUTOLOGIN NOCONSOLEKEYBOARD NOFASTBOOT NOFSTAB NOHOSTS NOLOCALES NONETWORKING NOTIMEZONE NOXAUTOCONFIG NOXAUTOLOGIN
+ export NOACCESSIBILITY NOAPTCDROM NOAUTOLOGIN NOCONSOLEKEYBOARD NOFASTBOOT NOFSTAB NOHOSTS NONETWORKING NOTIMEZONE NOXAUTOCONFIG NOXAUTOLOGIN
;;
access=*)
export LIVE_MEDIA_TIMEOUT
;;
- language=*|debian-installer/language=*)
- language=${x#debian-installer/language=}
- locale="$(lang2locale "$language")"
- set_locale="true"
- ;;
-
- locale=*|debian-installer/locale=*)
- LOCALE="${ARGUMENT#*=}"
- export LOCALE
- ;;
-
module=*)
MODULE="${ARGUMENT#module=}"
export MODULE
export NOHOSTS
;;
- nolocales)
- NOLOCALES="Yes"
- export NOLOCALES
- ;;
-
nonetworking)
NONETWORKING="Yes"
export NONETWORKING
export NOPRESEED
;;
- url=*)
- URL_LOCATION="${ARGUMENT#url=}"
-
- mount -o bind /sys /root/sys
- mount -o bind /proc /root/proc
- mount -o bind /dev /root/dev
-
- mkdir -p /root/var/run/network
- [ "${NETBOOT}" ] || chroot /root dhclient eth0
- chroot /root wget -P /tmp "${URL_LOCATION}"
- [ "${NETBOOT}" ] || chroot /root ifconfig eth0 down
-
- umount /root/sys
- umount /root/proc
- umount /root/dev
-
- LOCATIONS="/tmp/$(basename ${URL_LOCATION}) ${LOCATIONS}"
- ;;
-
*/*=*)
question="${ARGUMENT%%=*}"
value="${ARGUMENT#*=}"
do_netmount ()
{
- rc=1
-
modprobe -q af_packet # For DHCP
udevadm trigger
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
- if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) && do_httpmount
+ rc=1
+
+ if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] )
then
- rc=0
- return ${rc}
+ do_httpmount
+ return $?
fi
if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
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 "${alt_mountpoint}"
+ dest="${alt_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
- umount "${mountpoint}"
+ if [ -d "${alt_mountpoint}" ]
+ then
+ umount "${alt_mountpoint}"
+ rmdir "${alt_mountpoint}"
+ fi
+ umount "${mountpoint}"
+ elif [ "${webfile}" != "FETCH" ] ; then
+ NETBOOT="${webfile}"
+ export NETBOOT
fi
return ${rc}