dhclient-script: amend previous change (#1210984)
This commit is contained in:
parent
c191e7ecf1
commit
8568b714e7
@ -204,7 +204,7 @@ quad2num() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ip2num() {
|
ip2num() {
|
||||||
IFS="." quad2num "${1}"
|
IFS='.' quad2num ${1}
|
||||||
}
|
}
|
||||||
|
|
||||||
num2ip() {
|
num2ip() {
|
||||||
@ -279,11 +279,11 @@ add_default_gateway() {
|
|||||||
router="${1}"
|
router="${1}"
|
||||||
|
|
||||||
if is_router_reachable "${router}" ; then
|
if is_router_reachable "${router}" ; then
|
||||||
metric=""
|
if [ $# -gt 1 ] && [ -n "${2}" ] && [[ "${2}" -gt 0 ]]; then
|
||||||
if [ $# -gt 1 ] && [ "${2}" -gt 0 ]; then
|
ip -4 route replace default via "${router}" dev "${interface}" metric "${2}"
|
||||||
metric="metric ${2}"
|
else
|
||||||
|
ip -4 route replace default via "${router}" dev "${interface}"
|
||||||
fi
|
fi
|
||||||
ip -4 route replace default via "${router}" dev "${interface}" "${metric}"
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
logmessage "failed to create default route: ${router} dev ${interface} ${metric}"
|
logmessage "failed to create default route: ${router} dev ${interface} ${metric}"
|
||||||
return 1
|
return 1
|
||||||
@ -428,7 +428,7 @@ dhconfig() {
|
|||||||
metric="metric ${metric}"
|
metric="metric ${metric}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ip -4 route replace "${target}/${prefix}" proto static via "${gateway}" dev "${interface}" "${metric}" "${scope}"
|
ip -4 route replace "${target}/${prefix}" proto static via "${gateway}" dev "${interface}" ${metric} ${scope}
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
logmessage "failed to create static route: ${target}/${prefix} via ${gateway} dev ${interface} ${metric}"
|
logmessage "failed to create static route: ${target}/${prefix} via ${gateway} dev ${interface} ${metric}"
|
||||||
@ -459,7 +459,7 @@ dhconfig() {
|
|||||||
|
|
||||||
if [ -z "${router}" ] ||
|
if [ -z "${router}" ] ||
|
||||||
[ "${added_router}" = "1" ] ||
|
[ "${added_router}" = "1" ] ||
|
||||||
[ "$(IFS=. ip2num ${router})" -le 0 ] ||
|
[ "$(IFS='.' ip2num ${router})" -le 0 ] ||
|
||||||
[[ ( "${router}" = "${new_broadcast_address}" ) &&
|
[[ ( "${router}" = "${new_broadcast_address}" ) &&
|
||||||
( "${new_subnet_mask}" != "255.255.255.255" ) ]]; then
|
( "${new_subnet_mask}" != "255.255.255.255" ) ]]; then
|
||||||
continue
|
continue
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.2
|
Version: 4.3.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -675,6 +675,9 @@ done
|
|||||||
%doc doc/html/
|
%doc doc/html/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 13 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-4
|
||||||
|
- dhclient-script: amend previous change (#1210984)
|
||||||
|
|
||||||
* Wed Mar 25 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-3
|
* Wed Mar 25 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-3
|
||||||
- dhclient-script: fix shellcheck.net suggestions
|
- dhclient-script: fix shellcheck.net suggestions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user