]> git.ipfire.org Git - thirdparty/dracut.git/blame_incremental - modules.d/95cifs/cifsroot.sh
chore: remove unnecessary shellcheck disable for SC2154
[thirdparty/dracut.git] / modules.d / 95cifs / cifsroot.sh
... / ...
CommitLineData
1#!/bin/sh
2
3type 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"
11root="$2"
12NEWROOT="$3"
13
14cifs_to_var "$root"
15
16mount.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
20echo '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