34,8 → 34,9 |
DHCP=`grep ^DHCP= $CONF_FILE|cut -d"=" -f2` |
if [ $DHCP != off ] |
then |
$SED "s?^#route.*?&?g" /etc/dnsmasq.conf # dnsmasq become the DHCP server |
$SED "s?^no-dhcp-interface.*?#&?g" /etc/dnsmasq.conf # |
$SED "/^#dhcp-range/s/^#//" /etc/dnsmasq.conf # dnsmasq become the DHCP server |
$SED "/^#dhcp-option/s/^#//" /etc/dnsmasq.conf |
$SED "s?^no-dhcp-interface.*?#&?g" /etc/dnsmasq.conf |
/usr/bin/systemctl restart dnsmasq |
fi |
|
46,10 → 47,9 |
--off | -off) |
cp -f /etc/sysconfig/network-scripts/default-ifcfg-$INTIF /etc/sysconfig/network-scripts/ifcfg-$INTIF |
ifup $INTIF |
$SED "s?^route.*?#&?g" /etc/dnsmasq.conf # |
$SED "s?^#no-dhcp-interface=$INTIF?no-dhcp-interface=$INTIF?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=tun0?no-dhcp-interface=tun0?g" /etc/dnsmasq.conf |
$SED "s?^#no-dhcp-interface=lo?no-dhcp-interface=lo?g" /etc/dnsmasq.conf |
$SED "s?^dhcp-range.*?#&?g" /etc/dnsmasq.conf # dnsmasq is no more the DHCP server (it's coova) |
$SED "s?^dhcp-option.*?#&?g" /etc/dnsmasq.conf # dnsmasq is no more the DHCP server (it's coova) |
$SED "/#no-dhcp-interface/s/^#//" /etc/dnsmasq.conf |
/usr/bin/systemctl restart dnsmasq |
/usr/bin/systemctl start chilli |
sh /usr/local/bin/alcasar-iptables.sh |