original interfaces file
This commit is contained in:
parent
af37d67bb2
commit
1189d07005
|
@ -58,8 +58,8 @@ function hotspot_off {
|
||||||
|
|
||||||
rm /etc/hostapd/hostapd.conf
|
rm /etc/hostapd/hostapd.conf
|
||||||
|
|
||||||
if [ -f /etc/network/interfaces_old ]; then
|
if [ -f /etc/network/interfaces_original ]; then
|
||||||
cp /etc/network/interfaces_old /etc/network/interfaces
|
cp /etc/network/interfaces_original /etc/network/interfaces
|
||||||
else
|
else
|
||||||
echo '# interfaces(5) file used by ifup(8) and ifdown(8)' > /etc/network/interfaces
|
echo '# interfaces(5) file used by ifup(8) and ifdown(8)' > /etc/network/interfaces
|
||||||
echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
|
echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
|
||||||
|
@ -110,8 +110,10 @@ function hotspot_on {
|
||||||
echo '## Accept all MAC address ###' >> /etc/hostapd/hostapd.conf
|
echo '## Accept all MAC address ###' >> /etc/hostapd/hostapd.conf
|
||||||
echo 'macaddr_acl=0' >> /etc/hostapd/hostapd.conf
|
echo 'macaddr_acl=0' >> /etc/hostapd/hostapd.conf
|
||||||
|
|
||||||
|
if [ ! -f /etc/network/interfaces_original ]; then
|
||||||
if ! grep -q "# Hotspot" /etc/network/interfaces; then
|
if ! grep -q "# Hotspot" /etc/network/interfaces; then
|
||||||
cp /etc/network/interfaces /etc/network/interfaces_old
|
cp /etc/network/interfaces /etc/network/interfaces_original
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '# Hotspot' > /etc/network/interfaces
|
echo '# Hotspot' > /etc/network/interfaces
|
||||||
|
|
Loading…
Reference in New Issue