3 # root=cifs://[user:pass@]<server>/<folder>
5 # This syntax can come from DHCP root-path as well.
7 # If a username or password are not specified as part of the root, then they
8 # will be pulled from cifsuser and cifspass on the kernel command line,
12 type getarg
>/dev
/null
2>&1 || .
/lib
/dracut-lib.sh
15 # This script is sourced, so root should be set. But let's be paranoid
16 [ -z "$root" ] && root
=$
(getarg root
=)
18 if [ -z "$netroot" ]; then
19 for netroot
in $
(getargs netroot
=); do
20 [ "${netroot%%:*}" = "cifs" ] && break
22 [ "${netroot%%:*}" = "cifs" ] ||
unset netroot
25 # Root takes precedence over netroot
26 if [ "${root%%:*}" = "cifs" ] ; then
27 if [ -n "$netroot" ] ; then
28 warn
"root takes precedence over netroot. Ignoring netroot"
34 # If it's not cifs we don't continue
35 [ "${netroot%%:*}" = "cifs" ] ||
return
37 # Check required arguments
40 # If we don't have a server, we need dhcp
41 if [ -z "$server" ] ; then
48 echo '[ -e $NEWROOT/proc ]' > $hookdir/initqueue
/finished
/cifsroot.sh