mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
dhcpcd.exe: Only set gateway when we have received one
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
11f6226f65
commit
36914cce70
@@ -55,9 +55,11 @@ dhcpcd_up()
|
||||
echo -n "$new_ip_address" > /var/ipfire/red/local-ipaddress
|
||||
|
||||
# Get default gateway
|
||||
if [ -n "${new_routers}" ]; then
|
||||
grep -v -E "\<gateway\>" /etc/hosts > /tmp/hosts
|
||||
echo "$new_routers gateway" >> /tmp/hosts
|
||||
mv /tmp/hosts /etc/hosts
|
||||
fi
|
||||
|
||||
if [ $update ]; then
|
||||
[ -e "/var/ipfire/red/active" ] || touch /var/ipfire/red/active
|
||||
|
||||
Reference in New Issue
Block a user