Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib/dracut/modules..../90livene...
File: livenetroot.sh
#!/bin/sh
[0] Fix | Delete
# livenetroot - fetch a live image from the network and run it
[1] Fix | Delete
[2] Fix | Delete
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
[3] Fix | Delete
[4] Fix | Delete
. /lib/url-lib.sh
[5] Fix | Delete
[6] Fix | Delete
PATH=/usr/sbin:/usr/bin:/sbin:/bin
[7] Fix | Delete
[8] Fix | Delete
[ -e /tmp/livenet.downloaded ] && exit 0
[9] Fix | Delete
[10] Fix | Delete
# args get passed from 40network/netroot
[11] Fix | Delete
netroot="$2"
[12] Fix | Delete
liveurl="${netroot#livenet:}"
[13] Fix | Delete
info "fetching $liveurl"
[14] Fix | Delete
imgfile=$(fetch_url "$liveurl")
[15] Fix | Delete
[16] Fix | Delete
if [ $? != 0 ]; then
[17] Fix | Delete
warn "failed to download live image: error $?"
[18] Fix | Delete
exit 1
[19] Fix | Delete
fi
[20] Fix | Delete
[21] Fix | Delete
> /tmp/livenet.downloaded
[22] Fix | Delete
[23] Fix | Delete
# TODO: couldn't dmsquash-live-root handle this?
[24] Fix | Delete
if [ ${imgfile##*.} = "iso" ]; then
[25] Fix | Delete
root=$(losetup -f)
[26] Fix | Delete
losetup $root $imgfile
[27] Fix | Delete
else
[28] Fix | Delete
root=$imgfile
[29] Fix | Delete
fi
[30] Fix | Delete
[31] Fix | Delete
exec /sbin/dmsquash-live-root $root
[32] Fix | Delete
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function