Fix bug where tty is dropped out of device name

This commit is contained in:
Igor Socec 2017-01-25 16:36:02 +01:00
parent f3babe58df
commit b375ee19ce

View file

@ -63,9 +63,9 @@ do_read_config()
# configuration lines # configuration lines
CONF_LINES[$CONF_SIZE]=$(echo -n $line) CONF_LINES[$CONF_SIZE]=$(echo -n $line)
# extract configuration arguments # extract configuration arguments
tcp=$(echo $line | awk '{print $1}' | tr -d "tcp=") tcp=$(echo $line | awk '{print $1}' | sed -e 's/tcp=//')
tty=$(echo $line | awk '{print $2}' | tr -d "tty=") tty=$(echo $line | awk '{print $2}' | sed -e 's/tty=//')
baud=$(echo $line | awk '{print $3}' | tr -d "baud=") baud=$(echo $line | awk '{print $3}' | sed -e 's/baud=//')
# compose configuration argument lines for passing to the servers # compose configuration argument lines for passing to the servers
CONF_ARGS[$CONF_SIZE]="-p $tcp -t $tty -b $baud" CONF_ARGS[$CONF_SIZE]="-p $tcp -t $tty -b $baud"
# increment configuration size (array index) # increment configuration size (array index)