You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
290 B
12 lines
290 B
#!/bin/bash
|
|
|
|
cd "$(dirname "$0")"
|
|
line="$1"
|
|
state="$2"
|
|
{ [[ "$line" =~ ^[0-9]+$ ]] && [[ "$state" =~ ^[01]$ ]]; } || { echo >&2 "usage: $0 <line> <0|1>"; exit 1; }
|
|
. config.txt
|
|
ip_prefix=${server_ip%.*}
|
|
ip="$ip_prefix.$line"
|
|
|
|
./admin_scripts/auto_answer.pl "$ip" "$telnet_pass" 2 "$state"
|
|
|
|
|