dhclient-script: calling dhclient-up-hooks after setting up route, gateways
& interface alias (#848869)
This commit is contained in:
parent
5a6fff1160
commit
60e971c9e5
@ -363,12 +363,6 @@ dhconfig() {
|
||||
ip link set dev ${interface} mtu ${new_interface_mtu}
|
||||
fi
|
||||
|
||||
if [ -x ${ETCDIR}/dhclient-${interface}-up-hooks ]; then
|
||||
. ${ETCDIR}/dhclient-${interface}-up-hooks
|
||||
elif [ -x ${ETCDIR}/dhclient-up-hooks ]; then
|
||||
. ${ETCDIR}/dhclient-up-hooks
|
||||
fi
|
||||
|
||||
# static routes
|
||||
if [ -n "${new_classless_static_routes}" ] ||
|
||||
[ -n "${new_static_routes}" ]; then
|
||||
@ -494,6 +488,23 @@ dhconfig() {
|
||||
ip -4 addr add ${alias_ip_address}/${alias_prefix} broadcast ${alias_broadcast_address} dev ${interface} label ${interface}:0
|
||||
ip -4 route replace ${alias_ip_address}/32 dev ${interface}
|
||||
fi
|
||||
|
||||
# After dhclient brings an interface UP with a new IP address, subnet mask,
|
||||
# and routes, in the REBOOT/BOUND states -> search for "dhclient-up-hooks".
|
||||
if [ "${reason}" = "BOUND" ] || [ "${reason}" = "REBOOT" ] ||
|
||||
[ ! "${old_ip_address}" = "${new_ip_address}" ] ||
|
||||
[ ! "${old_subnet_mask}" = "${new_subnet_mask}" ] ||
|
||||
[ ! "${old_network_number}" = "${new_network_number}" ] ||
|
||||
[ ! "${old_broadcast_address}" = "${new_broadcast_address}" ] ||
|
||||
[ ! "${old_routers}" = "${new_routers}" ] ||
|
||||
[ ! "${old_interface_mtu}" = "${new_interface_mtu}" ]; then
|
||||
|
||||
if [ -x ${ETCDIR}/dhclient-${interface}-up-hooks ]; then
|
||||
. ${ETCDIR}/dhclient-${interface}-up-hooks
|
||||
elif [ -x ${ETCDIR}/dhclient-up-hooks ]; then
|
||||
. ${ETCDIR}/dhclient-up-hooks
|
||||
fi
|
||||
fi
|
||||
|
||||
make_resolv_conf
|
||||
|
||||
|
@ -593,6 +593,8 @@ fi
|
||||
%changelog
|
||||
* Mon Aug 20 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-12.P1
|
||||
- dhclient-script: fixed CONFIG variable value passed to need_config (#848858)
|
||||
- dhclient-script: calling dhclient-up-hooks after setting up route, gateways
|
||||
& interface alias (#848869)
|
||||
|
||||
* Fri Aug 17 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.4-11.P1
|
||||
- don't build libdst, it hasn't been used since 4.2.0 (#849166)
|
||||
|
Loading…
Reference in New Issue
Block a user