/etc/network/if-pre-up.d/hostap-utils is in hostap-utils 1:0.4.7-1ubuntu1.
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 | #!/bin/sh -e
PRISM2_SREC=/usr/sbin/prism2_srec
if [ ! -x $PRISM2_SREC ]; then
exit 0
fi
load_primary()
{
if [ ! -d /proc/net/hostap/$1 ]; then
echo "Host AP driver data for device $1 not found in procfs."
return 1
fi
if ! grep -q no_pri=1 /proc/net/hostap/$1/debug; then
echo "Downloading primary firmware $2 to interface $1"
$PRISM2_SREC -gs $1 $2
$PRISM2_SREC -gp $1 $2
fi
return 0
}
load_secondary()
{
if ! grep -q pri_only=1 /proc/net/hostap/$1/debug; then
echo "Downloading secondary (station) firmware $2 to interface $1"
$PRISM2_SREC -rp $1 $2
fi
return 0
}
if [ -n "$IF_FW_PRIMARY" ]; then
load_primary "$IFACE" "$IF_FW_PRIMARY"
fi
if [ -n "$IF_FW_SECONDARY" ]; then
load_secondary "$IFACE" "$IF_FW_SECONDARY"
fi
|