Fix few more shellcheck warnings
This commit is contained in:
parent
44da97e595
commit
09eafe36fc
12
11-dhclient
12
11-dhclient
@ -2,27 +2,27 @@
|
||||
# run dhclient.d scripts in an emulated environment
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin
|
||||
SAVEDIR=/var/lib/dhclient
|
||||
ETCDIR=/etc/dhcp
|
||||
SAVEDIR=/var/lib/dhclient
|
||||
interface=$1
|
||||
|
||||
for optname in "${!DHCP4_@}"; do
|
||||
newoptname=${optname,,};
|
||||
newoptname=new_${newoptname#dhcp4_};
|
||||
export $newoptname="${!optname}";
|
||||
export "${newoptname}"="${!optname}";
|
||||
done
|
||||
|
||||
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||
|
||||
[ -f /etc/sysconfig/network-scripts/ifcfg-$interface ] && \
|
||||
. /etc/sysconfig/network-scripts/ifcfg-$interface
|
||||
[ -f /etc/sysconfig/network-scripts/ifcfg-"${interface}" ] && \
|
||||
. /etc/sysconfig/network-scripts/ifcfg-"${interface}"
|
||||
|
||||
if [ -d $ETCDIR/dhclient.d ]; then
|
||||
for f in $ETCDIR/dhclient.d/*.sh; do
|
||||
if [ -x $f ]; then
|
||||
if [ -x "${f}" ]; then
|
||||
subsystem="${f%.sh}"
|
||||
subsystem="${subsystem##*/}"
|
||||
. ${f}
|
||||
. "${f}"
|
||||
if [ "$2" = "up" ]; then
|
||||
"${subsystem}_config"
|
||||
elif [ "$2" = "down" ]; then
|
||||
|
@ -16,7 +16,7 @@
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.3.6
|
||||
Release: 23%{?dist}
|
||||
Release: 24%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# 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.
|
||||
@ -677,6 +677,9 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon May 21 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-24
|
||||
- Fix few more shellcheck warnings
|
||||
|
||||
* Fri May 18 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-23
|
||||
- Get rid of eval in 11-dhclient
|
||||
- Credits to legolegs user of linux.org.ru
|
||||
|
Loading…
Reference in New Issue
Block a user