pb-udhcpc currently only passes the interface's MAC address for an 'add'
event, however it is useful to know it for any user event concerning a
network interface. Pass it to pb-event in all cases.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
# Collect relevant parameters to add an option to the bootfile
# parameter
# Collect relevant parameters to add an option to the bootfile
# parameter
- for name in rootpath siaddr bootfile
+ for name in rootpath siaddr bootfile mac
do
value=$(eval "echo \${$name}")
[ -n "$value" ] || continue;
do
value=$(eval "echo \${$name}")
[ -n "$value" ] || continue;
- pb-event remove@${interface}
+ mac=$(cat /sys/class/net/$interface/address)
+ pb-event remove@${interface} mac=$mac