]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh | |
4 | . /lib/cifs-lib.sh | |
5 | ||
6 | [ "$#" = 3 ] || exit 1 | |
7 | ||
8 | # root is in the form root=cifs://user:pass@[server]/[folder] either from | |
9 | # cmdline or dhcp root-path | |
10 | #netif="$1" | |
11 | root="$2" | |
12 | NEWROOT="$3" | |
13 | ||
14 | cifs_to_var "$root" | |
15 | ||
16 | mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root; } | |
17 | ||
18 | # inject new exit_if_exists | |
19 | # shellcheck disable=SC2016 | |
20 | echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm -f -- "$job"' > "$hookdir"/initqueue/cifs.sh | |
21 | # force udevsettle to break | |
22 | : > "$hookdir"/initqueue/work |