]>
Commit | Line | Data |
---|---|---|
d580636e | 1 | #!/bin/sh |
d580636e | 2 | |
9a52c3fd | 3 | type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh |
d580636e MG |
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 | |
760a4370 | 10 | #netif="$1" |
d580636e MG |
11 | root="$2" |
12 | NEWROOT="$3" | |
13 | ||
760a4370 | 14 | cifs_to_var "$root" |
d580636e | 15 | |
9a52c3fd | 16 | mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root; } |
d580636e MG |
17 | |
18 | # inject new exit_if_exists | |
760a4370 | 19 | # shellcheck disable=SC2016 |
760a4370 | 20 | echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm -f -- "$job"' > "$hookdir"/initqueue/cifs.sh |
d580636e | 21 | # force udevsettle to break |
760a4370 | 22 | : > "$hookdir"/initqueue/work |