projects
/
live-boot-grml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3ed3938
)
Adding support for booting iso images over http or wget.
author
Michal Suchanek
<hramrach@centrum.cz>
Fri, 4 Jun 2010 07:23:59 +0000
(09:23 +0200)
committer
Daniel Baumann
<daniel@debian.org>
Wed, 9 Mar 2011 16:53:26 +0000
(17:53 +0100)
scripts/live
patch
|
blob
|
history
diff --git
a/scripts/live
b/scripts/live
index
fd4a5e4
..
a9c0f13
100755
(executable)
--- 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"
echo "/root/usr/lib" >> /etc/ld.so.conf
mountpoint="/live/image"
+ext_mountpoint="/ext_volume"
LIVE_MEDIA_PATH="live"
root_persistence="live-rw"
LIVE_MEDIA_PATH="live"
root_persistence="live-rw"
@@
-791,19
+792,25
@@
do_netmount ()
do_httpmount ()
{
rc=1
do_httpmount ()
{
rc=1
- dest="${mountpoint}/${LIVE_MEDIA_PATH}"
- mount -t ramfs ram "${mountpoint}"
- mkdir -p "${dest}"
for webfile in HTTPFS FTPFS FETCH
do
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
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
if [ "${webfile}" = "FETCH" ]
then
case "$url" in
@@
-834,6
+841,12
@@
do_httpmount ()
fi
[ ${?} -eq 0 ] && rc=0
[ "${extension}" = "tgz" ] && live_dest="ram"
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
;;
break
;;
@@
-846,6
+859,11
@@
do_httpmount ()
if [ ${rc} != 0 ]
then
if [ ${rc} != 0 ]
then
+ if [ -d "${ext_mountpoint}" ]
+ then
+ umount "${ext_mountpoint}"
+ rmdir "${ext_mountpoint}"
+ fi
umount "${mountpoint}"
elif [ "${webfile}" != "FETCH" ] ; then
NETBOOT="${webfile}"
umount "${mountpoint}"
elif [ "${webfile}" != "FETCH" ] ; then
NETBOOT="${webfile}"