10 lines
280 B
Bash
10 lines
280 B
Bash
#!/bin/ash
|
|
|
|
num_macs=`ls /tmp/tinc/peer/$NODE/mac | wc -l`
|
|
if [ "$num_macs" = "1" ]; then
|
|
mac=`ls /tmp/tinc/peer/$NODE/mac`
|
|
ips=`ls /tmp/tinc/peer/$NODE/ip`
|
|
echo $ips | xargs -n 1 -I {} echo "[ARP] Adding {} to the table..."
|
|
echo $ips | xargs -n 1 -I {} arp -s {} $mac
|
|
fi
|