summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-09-05 14:21:44 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-09-08 15:05:17 +1000
commit4232af7eb3585cc5cc1413a8a2a6287a1643957e (patch)
tree38c1d4222d1d8a922d7f2553300fb3959959491a
parent74a77f5ff60a3ec2ede785827d60ec2fc646a3c0 (diff)
downloadtalos-petitboot-4232af7eb3585cc5cc1413a8a2a6287a1643957e.tar.gz
talos-petitboot-4232af7eb3585cc5cc1413a8a2a6287a1643957e.zip
utils: Always pass MAC address in pb-udhcpc
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> (cherry picked from commit 4da0965a861bedd4332217c131abf399bc2b5a18)
-rw-r--r--utils/pb-udhcpc5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc
index 7ed9035..4495266 100644
--- a/utils/pb-udhcpc
+++ b/utils/pb-udhcpc
@@ -40,7 +40,7 @@ pb_add () {
# 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;
@@ -53,7 +53,8 @@ pb_add () {
}
pb_remove () {
- pb-event remove@${interface}
+ mac=$(cat /sys/class/net/$interface/address)
+ pb-event remove@${interface} mac=$mac
}
case "$1" in
OpenPOWER on IntegriCloud