Skip to content

Instantly share code, notes, and snippets.

@nicholasaiello
Created February 28, 2022 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicholasaiello/a01384c853052e63662294f8bf515696 to your computer and use it in GitHub Desktop.
Save nicholasaiello/a01384c853052e63662294f8bf515696 to your computer and use it in GitHub Desktop.
Allow /sbin/get-unique-id to reference wlan if eth0 does not exist
#!/bin/sh
NET_INF=/sys/class/net/eth0/address
if ! [ -f "$NET_INF" ]; then
NET_INF=/sys/class/net/wlan0/address
fi
sed -e 's,:,,g' "$NET_INF"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment