network: don't use "ifup -m"
[dracut.git] / modules.d / 95rootfs-block / parse-block.sh
blob2905a1e0b5f85ea5a5c8107df4a39dd88ce58149
1 #!/bin/sh
3 case "$root" in
4 block:LABEL=*|LABEL=*)
5 root="${root#block:}"
6 root="$(echo $root | sed 's,/,\\x2f,g')"
7 root="block:/dev/disk/by-label/${root#LABEL=}"
8 rootok=1 ;;
9 block:UUID=*|UUID=*)
10 root="${root#block:}"
11 root="${root#UUID=}"
12 root="$(echo $root | tr "[:upper:]" "[:lower:]")"
13 root="block:/dev/disk/by-uuid/${root#UUID=}"
14 rootok=1 ;;
15 block:PARTUUID=*|PARTUUID=*)
16 root="${root#block:}"
17 root="${root#PARTUUID=}"
18 root="$(echo $root | tr "[:upper:]" "[:lower:]")"
19 root="block:/dev/disk/by-partuuid/${root}"
20 rootok=1 ;;
21 block:PARTLABEL=*|PARTLABEL=*)
22 root="${root#block:}"
23 root="block:/dev/disk/by-partlabel/${root#PARTLABEL=}"
24 rootok=1 ;;
25 /dev/*)
26 root="block:${root}"
27 rootok=1 ;;
28 esac
30 [ "${root%%:*}" = "block" ] && wait_for_dev "${root#block:}"