Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../95cifs
File: parse-cifsroot.sh
#!/bin/sh
[0] Fix | Delete
#
[1] Fix | Delete
# root=cifs://[user:pass@]<server>/<folder>
[2] Fix | Delete
#
[3] Fix | Delete
# This syntax can come from DHCP root-path as well.
[4] Fix | Delete
#
[5] Fix | Delete
# If a username or password are not specified as part of the root, then they
[6] Fix | Delete
# will be pulled from cifsuser and cifspass on the kernel command line,
[7] Fix | Delete
# respectively.
[8] Fix | Delete
#
[9] Fix | Delete
[10] Fix | Delete
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
[11] Fix | Delete
. /lib/cifs-lib.sh
[12] Fix | Delete
[13] Fix | Delete
# This script is sourced, so root should be set. But let's be paranoid
[14] Fix | Delete
[ -z "$root" ] && root=$(getarg root=)
[15] Fix | Delete
[16] Fix | Delete
if [ -z "$netroot" ]; then
[17] Fix | Delete
for netroot in $(getargs netroot=); do
[18] Fix | Delete
[ "${netroot%%:*}" = "cifs" ] && break
[19] Fix | Delete
done
[20] Fix | Delete
[ "${netroot%%:*}" = "cifs" ] || unset netroot
[21] Fix | Delete
fi
[22] Fix | Delete
[23] Fix | Delete
# Root takes precedence over netroot
[24] Fix | Delete
if [ "${root%%:*}" = "cifs" ] ; then
[25] Fix | Delete
if [ -n "$netroot" ] ; then
[26] Fix | Delete
warn "root takes precedence over netroot. Ignoring netroot"
[27] Fix | Delete
fi
[28] Fix | Delete
netroot=$root
[29] Fix | Delete
unset root
[30] Fix | Delete
fi
[31] Fix | Delete
[32] Fix | Delete
# If it's not cifs we don't continue
[33] Fix | Delete
[ "${netroot%%:*}" = "cifs" ] || return
[34] Fix | Delete
[35] Fix | Delete
# Check required arguments
[36] Fix | Delete
cifs_to_var $netroot
[37] Fix | Delete
[38] Fix | Delete
# If we don't have a server, we need dhcp
[39] Fix | Delete
if [ -z "$server" ] ; then
[40] Fix | Delete
DHCPORSERVER="1"
[41] Fix | Delete
fi;
[42] Fix | Delete
[43] Fix | Delete
# Done, all good!
[44] Fix | Delete
rootok=1
[45] Fix | Delete
[46] Fix | Delete
echo '[ -e $NEWROOT/proc ]' > $hookdir/initqueue/finished/cifsroot.sh
[47] Fix | Delete
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function