Page 1 of 1

Display Hardware MAC Addresses During Install

Posted: 15 Jul 2015, 01:52
by bburke
Here's a little modification to the 003-settings.xzm module I whipped up for a Porteus Kiosk deployment at my university. Not all of our hardware is properly labeled, so I modified the ISO with the following script which displays all hardware MAC addresses as notifications during the install wizard. This is admittedly very crude and can be executed more than once if the wizard fails to make a successful Internet connection (an if statement to check for the existence of the temp file would fix that); however, I needed a solution as quickly as possible, and it's worked fine so far. Thought I would share it with the community. Unified diff follows:

Code: Select all

--- 003-settings/opt/porteus-scripts/welcome	2015-05-30 09:41:44.000000000 -0500
+++ 003-settings/opt/porteus-scripts/welcome	2015-07-14 08:58:47.677963216 -0500
@@ -54,6 +54,13 @@
 ## Main dialog
 ## ====================================================================
 
+# Display hardware MAC addresses as notifications
+ifconfig -a | grep HWaddr | tr -d '\t' > /tmp/hwaddr.tmp
+while IFS= read -r addr
+do
+    dunstify -u critical "$addr"
+done < /tmp/hwaddr.tmp
+
 ## Trap exits
 trap 'cleanup' 2 14 15
 
Feel free to post any improvements to the code you might have.

Re: Display Hardware MAC Addresses During Install

Posted: 15 Jul 2015, 06:56
by fanthom
Hello bburke,

I have implemented this feature just yesterday ;)
Image

Added also timeconfig utility as we have found that certain wifi drivers fail to connect if system clock is not set correctly (thinks that SSL certs are outdated?)

Will go public in next release.