Conditions to stop repeated applications

This commit is contained in:
Bob Mottram 2014-12-28 10:36:39 +00:00
parent 93162ef4d1
commit e3468ce863
1 changed files with 6 additions and 2 deletions

View File

@ -7271,8 +7271,12 @@ function enable_wifi_hotspot {
echo " dns-nameservers $ROUTER_IP_ADDRESS" >> /etc/network/interfaces
fi
if ! grep -q '#option domain-name "example.org";' /etc/network/interfaces; then
sed -i 's/option domain-name "example.org";/#option domain-name "example.org";/g' /etc/dhcp/dhcpd.conf
fi
if ! grep -q '#option domain-name-servers ns1.example.org, ns2.example.org;' /etc/network/interfaces; then
sed -i 's/option domain-name-servers ns1.example.org, ns2.example.org;/#option domain-name-servers ns1.example.org, ns2.example.org;/g' /etc/dhcp/dhcpd.conf
fi
sed -i 's/#authoritative;/authoritative;/g' /etc/dhcp/dhcpd.conf
if ! grep -q "subnet $WIFI_SUBNET netmask 255.255.255.0" /etc/dhcp/dhcpd.conf; then