You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.1 KiB

13 years ago
#!/bin/bash
# called by dracut
13 years ago
check() {
# If our prerequisites are not met, fail anyways.
require_binaries mount.cifs || return 1
13 years ago
[[ $hostonly ]] || [[ $mount_needs ]] && {
for fs in "${host_fs_types[@]}"; do
[[ "$fs" == "cifs" ]] && return 0
13 years ago
done
return 255
}
return 0
}
# called by dracut
13 years ago
depends() {
# We depend on network modules being loaded
echo network
}
# called by dracut
13 years ago
installkernel() {
instmods cifs ipv6
}
# called by dracut
13 years ago
install() {
local _i
local _nsslibs
inst_multiple -o mount.cifs
inst_multiple /etc/services /etc/nsswitch.conf /etc/protocols
13 years ago
inst_libdir_file 'libcap-ng.so*'
_nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
| tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
_nsslibs=${_nsslibs#|}
_nsslibs=${_nsslibs%|}
inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
13 years ago
inst_hook cmdline 90 "$moddir/parse-cifsroot.sh"
inst "$moddir/cifsroot.sh" "/sbin/cifsroot"
inst "$moddir/cifs-lib.sh" "/lib/cifs-lib.sh"
dracut_need_initqueue
13 years ago
}