code cleanup, arch fixes
[automated-distro-installer] / pxe-server
index fb92d66c82b736692ce2d9849491c4798d83101e..a3df1a5953846368397e9b335be844970b132771 100755 (executable)
@@ -63,7 +63,6 @@ EOF
 
 ##### begin command line parsing ########
 
-args=()
 redep=true
 acks=2
 wait=false
@@ -80,7 +79,7 @@ while true; do
     esac
 done
 
-read host type <<<"$@"
+read -r host type <<<"$@"
 
 case $# in
     0|2);;
@@ -120,7 +119,6 @@ EOF
 
 fai() {
     cat <<EOF
-$set_host_tag
 dhcp-boot=${host_tag}pxelinux.0,faiserver.lan,faiserver.lan
 EOF
 }
@@ -132,8 +130,7 @@ ack-wait() {
     fi
     regex=".*DHCPACK.*$host_regex$"
     i=0
-    tmp=$(mktemp)
-    while (( i != wait_count )) && read line; do
+    while (( i != wait_count )) && read -r line; do
         if [[ $line =~ $regex ]]; then
             i=$((i+1))
             echo $line