Adding upstream version 1.110.4.
[live-boot-grml.git] / scripts / live-helpers
index ccc3a4a..f49eaf7 100644 (file)
@@ -288,3 +288,17 @@ 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
+}