File: rootfallback.sh

package info (click to toggle)
dracut 109-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,756 kB
  • sloc: sh: 24,508; ansic: 5,234; makefile: 346; perl: 186; python: 48; javascript: 19
file content (22 lines) | stat: -rwxr-xr-x 460 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

command -v getarg > /dev/null || . /lib/dracut-lib.sh

for root in $(getargs rootfallback=); do
    root=$(label_uuid_to_dev "$root")

    if ! [ -b "$root" ]; then
        warn "Could not find rootfallback $root"
        continue
    fi

    if mount "$root" /sysroot; then
        info "Mounted rootfallback $root"
        exit 0
    else
        warn "Failed to mount rootfallback $root"
        exit 1
    fi
done

[ -e "$job" ] && rm -f "$job"