crypt: check for crypttab before reading
[dracut.git] / modules.d / 90livenet / parse-livenet.sh
bloba6b28423504fba4a08a2f4beb7fb8d399c2c24d4
1 #!/bin/sh
2 # live net images - just like live images, but specified like:
3 # root=live:[url-to-backing-file]
5 [ -z "$root" ] && root=$(getarg root=)
6 . /lib/url-lib.sh
8 # live updates
9 updates=$(getarg live.updates=)
10 if [ -n "$updates" ]; then
11 # make sure network comes up even if we're doing a local live device
12 if [ -z "$netroot" ]; then
13 echo > /tmp/net.ifaces
15 echo "$updates" > /tmp/liveupdates.info
16 echo '[ -e /tmp/liveupdates.done ]' > \
17 $hookdir/initqueue/finished/liveupdates.sh
20 str_starts "$root" "live:" && liveurl="$root"
21 str_starts "$liveurl" "live:" || return
22 liveurl="${liveurl#live:}"
24 # setting netroot to "livenet:..." makes "livenetroot" get run after ifup
25 if get_url_handler "$liveurl" >/dev/null; then
26 info "livenet: root image at $liveurl"
27 netroot="livenet:$liveurl"
28 root="livenet" # quiet complaints from init
29 rootok=1
30 wait_for_dev -n /dev/root
31 else
32 info "livenet: no url handler for $liveurl"