X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=504a3f4e5348709693d6a3b6e6b34e1fbb269ad0;hb=c303d09e10ef3774540af4b91d0f25bf8f3c1981;hp=ccc3a4ad5e2aab54b4fb7b75409a40465d403dac;hpb=482099e5a39fa3f8eec108a4e26182647c8cb4d6;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index ccc3a4a..504a3f4 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -268,7 +268,7 @@ find_files () devname=$(sys2dev "${dev}") devfstype="$(get_fstype ${devname})" - if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] || [ "${devfstype}" = "ext3" ] + if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] || [ "${devfstype}" = "ext3" ] || [ "${devfstype}" = "jffs2" ] then # FIXME: all supported block devices should be scanned mkdir -p "${snap_backing}" @@ -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} +}