Merge r4174
This commit is contained in:
parent
279d1cadd0
commit
27109e5245
2 changed files with 9 additions and 5 deletions
|
@ -8,7 +8,7 @@ apply_lease() {
|
||||||
config_get ipaddr "$cfg" ipaddr
|
config_get ipaddr "$cfg" ipaddr
|
||||||
|
|
||||||
[ -n "$macaddr" -a -n "$ipaddr" ] || return 0
|
[ -n "$macaddr" -a -n "$ipaddr" ] || return 0
|
||||||
|
|
||||||
echo "$macaddr $ipaddr" >> /var/etc/ethers
|
echo "$macaddr $ipaddr" >> /var/etc/ethers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,17 +19,19 @@ start() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -d /var/etc || mkdir -p /var/etc
|
test -d /var/etc || mkdir -p /var/etc
|
||||||
|
|
||||||
|
echo "# This file is autogenerated, use /etc/ethers.local instead" > /var/etc/ethers
|
||||||
|
|
||||||
config_load luci_ethers
|
config_load luci_ethers
|
||||||
config_foreach apply_lease static_lease
|
config_foreach apply_lease static_lease
|
||||||
|
|
||||||
test -f /etc/ethers.local && cat /etc/ethers.local >> /var/etc/ethers
|
test -f /etc/ethers.local && cat /etc/ethers.local >> /var/etc/ethers
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
test -f /var/etc/ethers && rm -f /var/etc/ethers
|
test -f /var/etc/ethers && rm -f /var/etc/ethers
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ start() {
|
||||||
ln -s /var/etc/hosts /etc/hosts
|
ln -s /var/etc/hosts /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "# This file is autogenerated, use /etc/hosts.local instead" > /var/etc/hosts
|
||||||
|
|
||||||
test -d /var/etc || mkdir -p /var/etc
|
test -d /var/etc || mkdir -p /var/etc
|
||||||
test -f /etc/hosts.local && cat /etc/hosts.local >> /var/etc/hosts
|
test -f /etc/hosts.local && cat /etc/hosts.local >> /var/etc/hosts
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue