From 09eafe36fcd217b9981ae23ea6028f80a299f9a7 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: May 21 2018 09:22:24 +0000 Subject: Fix few more shellcheck warnings --- diff --git a/11-dhclient b/11-dhclient index 40b08a3..43b5259 100644 --- a/11-dhclient +++ b/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 diff --git a/dhcp.spec b/dhcp.spec index 6bb3108..6ec2168 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -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 - 12:4.3.6-24 +- Fix few more shellcheck warnings + * Fri May 18 2018 Pavel Zhukov - 12:4.3.6-23 - Get rid of eval in 11-dhclient - Credits to legolegs user of linux.org.ru