Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../95cifs
File: cifs-lib.sh
#!/bin/sh
[0] Fix | Delete
[1] Fix | Delete
# cifs_to_var CIFSROOT
[2] Fix | Delete
# use CIFSROOT to set $server, $path, and $options.
[3] Fix | Delete
# CIFSROOT is something like: cifs://[<username>[:<password>]]@<host>/<path>
[4] Fix | Delete
# NETIF is used to get information from DHCP options, if needed.
[5] Fix | Delete
[6] Fix | Delete
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
[7] Fix | Delete
[8] Fix | Delete
cifs_to_var() {
[9] Fix | Delete
local cifsuser; local cifspass
[10] Fix | Delete
# Check required arguments
[11] Fix | Delete
server=${1##cifs://}
[12] Fix | Delete
cifsuser=${server%@*}
[13] Fix | Delete
cifspass=${cifsuser#*:}
[14] Fix | Delete
if [ "$cifspass" != "$cifsuser" ]; then
[15] Fix | Delete
cifsuser=${cifsuser%:*}
[16] Fix | Delete
else
[17] Fix | Delete
cifspass=$(getarg cifspass)
[18] Fix | Delete
fi
[19] Fix | Delete
if [ "$cifsuser" != "$server" ]; then
[20] Fix | Delete
server="${server#*@}"
[21] Fix | Delete
else
[22] Fix | Delete
cifsuser=$(getarg cifsuser)
[23] Fix | Delete
fi
[24] Fix | Delete
[25] Fix | Delete
path=${server#*/}
[26] Fix | Delete
server=${server%/*}
[27] Fix | Delete
[28] Fix | Delete
if [ ! "$cifsuser" -o ! "$cifspass" ]; then
[29] Fix | Delete
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."
[30] Fix | Delete
fi
[31] Fix | Delete
options="user=$cifsuser,pass=$cifspass"
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function