original interfaces file
This commit is contained in:
parent
af37d67bb2
commit
1189d07005
|
@ -58,8 +58,8 @@ function hotspot_off {
|
|||
|
||||
rm /etc/hostapd/hostapd.conf
|
||||
|
||||
if [ -f /etc/network/interfaces_old ]; then
|
||||
cp /etc/network/interfaces_old /etc/network/interfaces
|
||||
if [ -f /etc/network/interfaces_original ]; then
|
||||
cp /etc/network/interfaces_original /etc/network/interfaces
|
||||
else
|
||||
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
|
||||
|
@ -110,8 +110,10 @@ function hotspot_on {
|
|||
echo '## Accept all MAC address ###' >> /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
|
||||
cp /etc/network/interfaces /etc/network/interfaces_old
|
||||
cp /etc/network/interfaces /etc/network/interfaces_original
|
||||
fi
|
||||
fi
|
||||
|
||||
echo '# Hotspot' > /etc/network/interfaces
|
||||
|
|
Loading…
Reference in New Issue