X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=5e1730bf652ea7a93ee2e594a5dc99ed2a38abc0;hb=703b697660daaf53e0c81f8847a877baee04bf40;hp=ccc3a4ad5e2aab54b4fb7b75409a40465d403dac;hpb=e5ed5f84c8dff7855284b6d37f14da6a2e85f1c5;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index ccc3a4a..5e1730b 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -288,3 +288,21 @@ find_files () done done } + +get_mac () +{ + mac="" + + for adaptor in /sys/class/net/* + do + status="$(cat ${adaptor}/iflink)" + + if [ "${status}" -eq 2 ] + then + mac="$(cat ${adaptor}/address)" + mac="$(echo ${mac} | sed 's/:/-/g' | tr '[a-z]' '[A-Z]')" + fi + done + + echo ${mac} +}