Commit fb586f95 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Small bugfix and cleanup

parent 1fd13c25
...@@ -361,7 +361,7 @@ function jobs () ...@@ -361,7 +361,7 @@ function jobs ()
rm -f /etc/network/interfaces.d/armbian.ap.nat rm -f /etc/network/interfaces.d/armbian.ap.nat
rm -f /etc/network/interfaces.d/armbian.ap.bridge rm -f /etc/network/interfaces.d/armbian.ap.bridge
rm -f /etc/dnsmasq.conf rm -f /etc/dnsmasq.conf
iptables -t nat -D POSTROUTING 1 iptables -t nat -D POSTROUTING 1 >/dev/null 2>&1
rm -f /etc/iptables.ipv4.nat rm -f /etc/iptables.ipv4.nat
rm -f /var/run/hostapd/* >/dev/null 2>&1 rm -f /var/run/hostapd/* >/dev/null 2>&1
reload-nety reload-nety
...@@ -397,7 +397,7 @@ function jobs () ...@@ -397,7 +397,7 @@ function jobs ()
rm -f /etc/network/interfaces.d/armbian.ap.nat rm -f /etc/network/interfaces.d/armbian.ap.nat
rm -f /etc/network/interfaces.d/armbian.ap.bridge rm -f /etc/network/interfaces.d/armbian.ap.bridge
rm -f /etc/dnsmasq.conf rm -f /etc/dnsmasq.conf
iptables -t nat -D POSTROUTING 1 iptables -t nat -D POSTROUTING 1 >/dev/null 2>&1
rm -f /etc/iptables.ipv4.nat rm -f /etc/iptables.ipv4.nat
rm -f /var/run/hostapd/* >/dev/null 2>&1 rm -f /var/run/hostapd/* >/dev/null 2>&1
sed -i '/^iptables/ d' /etc/rc.local sed -i '/^iptables/ d' /etc/rc.local
...@@ -538,7 +538,7 @@ function jobs () ...@@ -538,7 +538,7 @@ function jobs ()
echo -e "# armbian NAT hostapd\nallow-hotplug $WIRELESS_ADAPTER\niface $WIRELESS_ADAPTER inet static " > $TEMP_CONF echo -e "# armbian NAT hostapd\nallow-hotplug $WIRELESS_ADAPTER\niface $WIRELESS_ADAPTER inet static " > $TEMP_CONF
echo -e "\taddress 172.24.1.1\n\tnetmask 255.255.255.0\n\tnetwork 172.24.1.0\n\tbroadcast 172.24.1.255" >> $TEMP_CONF echo -e "\taddress 172.24.1.1\n\tnetmask 255.255.255.0\n\tnetwork 172.24.1.0\n\tbroadcast 172.24.1.255" >> $TEMP_CONF
echo -e "\tpost-up service dnsmasq start\tpost-up \n\tiptables-restore < /etc/iptables.ipv4.nat\n\tpost-down service dnsmasq stop" >> $TEMP_CONF echo -e "\tpost-up service dnsmasq start\n\tpost-up iptables-restore < /etc/iptables.ipv4.nat\n\tpost-down service dnsmasq stop" >> $TEMP_CONF
# create new configuration # create new configuration
echo "interface=$WIRELESS_ADAPTER # Use interface $WIRELESS_ADAPTER" > /etc/dnsmasq.conf echo "interface=$WIRELESS_ADAPTER # Use interface $WIRELESS_ADAPTER" > /etc/dnsmasq.conf
echo "listen-address=172.24.1.1 # Explicitly specify the address to listen on" >> /etc/dnsmasq.conf echo "listen-address=172.24.1.1 # Explicitly specify the address to listen on" >> /etc/dnsmasq.conf
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment