/usr/lib/dracut/modules.d/45url-lib/module-setup.sh is in dracut-network 040+1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #!/bin/bash
# module-setup for url-lib
# called by dracut
check() {
require_binaries curl || return 1
return 255
}
# called by dracut
depends() {
echo network
return 0
}
# called by dracut
install() {
local _dir _crt _found _lib
inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh"
inst_multiple -o ctorrent
inst_multiple curl
# also install libs for curl https
inst_libdir_file "libnsspem.so*"
inst_libdir_file "libnsssysinit.so*"
inst_libdir_file "libsoftokn3.so*"
inst_libdir_file "libsqlite3.so*"
for _dir in $libdirs; do
[[ -d $_dir ]] || continue
for _lib in $_dir/libcurl.so.*; do
[[ -e $_lib ]] || continue
_crt=$(grep -F --binary-files=text -z .crt $_lib)
[[ $_crt ]] || continue
[[ $_crt == /*/* ]] || continue
if ! inst_simple "$_crt"; then
dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work."
continue
fi
_found=1
done
done
[[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work."
}
|