X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=e93570f60da7f6ca4cbbaa4c449b47a853476c06;hb=f4831729f3a5ba8bc36519c513e41a75da1ef817;hp=4169c9044b1c520917dc0ea8a14ec8e48535bb77;hpb=6fc8f78d026b31f4f4a3ee6507d726ddc37adbc8;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 4169c90..e93570f 100755 --- a/scripts/live +++ b/scripts/live @@ -8,6 +8,7 @@ echo "/root/lib" >> /etc/ld.so.conf echo "/root/usr/lib" >> /etc/ld.so.conf mountpoint="/live/image" +alt_mountpoint="/media" LIVE_MEDIA_PATH="live" root_persistence="live-rw" @@ -59,13 +60,12 @@ Arguments () 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=*) @@ -213,17 +213,6 @@ Arguments () 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 @@ -284,11 +273,6 @@ Arguments () export NOHOSTS ;; - nolocales) - NOLOCALES="Yes" - export NOLOCALES - ;; - nonetworking) NONETWORKING="Yes" export NONETWORKING @@ -699,8 +683,6 @@ copy_live_to () do_netmount () { - rc=1 - modprobe -q af_packet # For DHCP udevadm trigger @@ -778,10 +760,12 @@ do_netmount () 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" ] @@ -808,19 +792,25 @@ do_netmount () 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 @@ -851,6 +841,12 @@ do_httpmount () 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 ;; @@ -863,7 +859,15 @@ do_httpmount () 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}