# use CIFSROOT to set $server, $path, and $options.
# CIFSROOT is something like: cifs://[<username>[:<password>]]@<host>/<path>
# NETIF is used to get information from DHCP options, if needed.
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
local cifsuser; local cifspass
# Check required arguments
if [ "$cifspass" != "$cifsuser" ]; then
cifspass=$(getarg cifspass)
if [ "$cifsuser" != "$server" ]; then
cifsuser=$(getarg cifsuser)
if [ ! "$cifsuser" -o ! "$cifspass" ]; then
die "For CIFS support you need to specify a cifsuser and cifspass either in the cifsuser and cifspass commandline parameters or in the root= CIFS URL."
options="user=$cifsuser,pass=$cifspass"