]>
git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/90livenet/livenetroot.sh
2 # livenetroot - fetch a live image from the network and run it
4 type getarg
>/dev
/null
2>&1 || .
/lib
/dracut-lib.sh
5 [ -f /tmp
/root.info
] && .
/tmp
/root.info
9 PATH
=/usr
/sbin
:/usr
/bin
:/sbin
:/bin
11 # args get passed from 40network/netroot
13 liveurl
="${netroot#livenet:}"
14 info
"fetching $liveurl"
15 imgfile
=$
(fetch_url
"$liveurl")
16 [ $?
= 0 ] || die
"failed to download live image: error $?"
18 # TODO: couldn't dmsquash-live-root handle this?
19 if [ ${imgfile##*.} = "iso" ]; then
21 losetup
$root $imgfile
26 exec /sbin
/dmsquash-live-root
$root