Fix missing head command
This commit is contained in:
@@ -17,8 +17,15 @@ mkdir -p /run/dot1x /run/wpa_supplicant
|
||||
|
||||
# --- knobs (override on the kernel cmdline) ---------------------------------
|
||||
NIC=$(getarg rd.dot1x.if=)
|
||||
# shellcheck disable=SC2010 # /sys/class/net names are kernel ifnames; ls|grep is safe here
|
||||
[ -n "$NIC" ] || NIC=$(ls /sys/class/net | grep -vE '^(lo|macsec)' | head -1)
|
||||
if [ -z "$NIC" ]; then
|
||||
# First non-loopback, non-macsec interface. Pure shell — ls/grep/head are
|
||||
# not guaranteed to exist in the initramfs.
|
||||
for _dev in /sys/class/net/*; do
|
||||
_name=${_dev##*/}
|
||||
case "$_name" in lo|macsec*) continue ;; esac
|
||||
NIC=$_name; break
|
||||
done
|
||||
fi
|
||||
NVINDEX=$(getarg rd.dot1x.nvindex=); [ -n "$NVINDEX" ] || NVINDEX=0x01800001
|
||||
TIMEOUT=$(getarg rd.dot1x.timeout=); [ -n "$TIMEOUT" ] || TIMEOUT=60
|
||||
|
||||
|
||||
@@ -22,7 +22,11 @@ installkernel() {
|
||||
}
|
||||
|
||||
install() {
|
||||
inst_multiple wpa_supplicant wpa_cli tpm2_nvread openssl ip setsid
|
||||
# wpa stack + tpm + openssl, plus the coreutils the hook calls. dracut on
|
||||
# RHEL only bundles binaries a module requests — head/ls/grep/etc. are NOT
|
||||
# present by default, so list everything the hook uses.
|
||||
inst_multiple wpa_supplicant wpa_cli tpm2_nvread openssl ip setsid \
|
||||
grep sed cut tr sha256sum sleep mkdir
|
||||
|
||||
# TSS libraries that tpm2_nvread dlopens
|
||||
inst_libdir_file "libtss2-*"
|
||||
|
||||
Reference in New Issue
Block a user