diff --git a/linux/next-build.sh b/linux/next-build.sh index a53aac2..bb8ef2d 100755 --- a/linux/next-build.sh +++ b/linux/next-build.sh @@ -20,6 +20,7 @@ builddir="$HOME/build/linux-next" date="$(date +%Y%m%d)" +name="next-$date" # comment out on single cpu systems parallel="-j8" @@ -31,7 +32,7 @@ parallel="-j8" # update / change branch git-fetch - git-checkout -b "next-${date}" "origin/master" + git-checkout -b "$name" "$name" # clean make $parallel clean diff --git a/mac-adresses-csv-to-dhcpd.sh b/mac-adresses-csv-to-dhcpd.sh new file mode 100755 index 0000000..a5520ca --- /dev/null +++ b/mac-adresses-csv-to-dhcpd.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +file="$1" +sep=';' +name='dryad' + +awk "-F$sep" 'BEGIN { + hc=1; + } + + function mac2dp(mac) + { + i=0; + newmac="" + while (i < 5) { + newmac = sprintf("%s%s:",newmac,substr(mac,(1+i*2),2)); + i++; + } + newmac = sprintf("%s%s",newmac,substr(mac,(1+i*2),2)); + return newmac; + } + + + /^S-09/ + { + mac = mac2dp($2) + print " host dryad" hc \ + " {\n hardware ethernet " mac + ";\n fixed-address 192.168.54." + i + ";\n }"; + hc++; + }' < "$1"