initscripts-10.23-1.fc41

List of Defects

Error: SHELLCHECK_WARNING (CWE-252): [#def1]
/etc/rc.d/init.d/network:38:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   36|   
#   37|   CWD=$(pwd)
#   38|-> cd /etc/sysconfig/network-scripts
#   39|   
#   40|   . ./network-functions

Error: SHELLCHECK_WARNING (CWE-457): [#def2]
/etc/rc.d/init.d/network:45:26: warning[SC2154]: __sed_discard_ignored_files is referenced but not assigned.
#   43|   # ignore aliases, alternative configurations, and editor backup files
#   44|   interfaces=$(ls ifcfg-* | \
#   45|->         LC_ALL=C sed -e "$__sed_discard_ignored_files" \
#   46|                  -e '/\(ifcfg-lo$\|:\|ifcfg-.*-range\)/d' \
#   47|                  -e '{ s/^ifcfg-//g;s/[0-9]/ &/}' | \

Error: SHELLCHECK_WARNING (CWE-156): [#def3]
/etc/rc.d/init.d/network:93:14: warning[SC2046]: Quote this to prevent word splitting.
#   91|       for i in $interfaces; do
#   92|           unset DEVICE TYPE SLAVE NM_CONTROLLED
#   93|->         eval $(LANG=C grep -F "DEVICE=" ifcfg-$i)
#   94|           eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#   95|           eval $(LANG=C grep -F "SLAVE=" ifcfg-$i)

Error: SHELLCHECK_WARNING (CWE-156): [#def4]
/etc/rc.d/init.d/network:94:14: warning[SC2046]: Quote this to prevent word splitting.
#   92|           unset DEVICE TYPE SLAVE NM_CONTROLLED
#   93|           eval $(LANG=C grep -F "DEVICE=" ifcfg-$i)
#   94|->         eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#   95|           eval $(LANG=C grep -F "SLAVE=" ifcfg-$i)
#   96|           eval $(LANG=C grep -F "NM_CONTROLLED=" ifcfg-$i)

Error: SHELLCHECK_WARNING (CWE-156): [#def5]
/etc/rc.d/init.d/network:95:14: warning[SC2046]: Quote this to prevent word splitting.
#   93|           eval $(LANG=C grep -F "DEVICE=" ifcfg-$i)
#   94|           eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#   95|->         eval $(LANG=C grep -F "SLAVE=" ifcfg-$i)
#   96|           eval $(LANG=C grep -F "NM_CONTROLLED=" ifcfg-$i)
#   97|   

Error: SHELLCHECK_WARNING (CWE-156): [#def6]
/etc/rc.d/init.d/network:96:14: warning[SC2046]: Quote this to prevent word splitting.
#   94|           eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#   95|           eval $(LANG=C grep -F "SLAVE=" ifcfg-$i)
#   96|->         eval $(LANG=C grep -F "NM_CONTROLLED=" ifcfg-$i)
#   97|   
#   98|           if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/etc/rc.d/init.d/network:108:32: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  106|               continue
#  107|           fi
#  108|->         if [ "$TYPE" = "xDSL"  -o  "$TYPE" = "Modem" ]; then
#  109|               xdslinterfaces="$xdslinterfaces $i"
#  110|               continue

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/etc/rc.d/init.d/network:122:44: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  120|           fi
#  121|   
#  122|->         if [ "${DEVICE%%.*}" != "$DEVICE"  -o  "${DEVICE##vlan}" != "$DEVICE" ] ; then
#  123|               vlaninterfaces="$vlaninterfaces $i"
#  124|               continue

Error: SHELLCHECK_WARNING (CWE-563): [#def9]
/etc/rc.d/init.d/network:147:67: warning[SC2034]: ignore appears unused. Verify use (or export if used externally).
#  145|       if [ -f /etc/sysconfig/static-routes ]; then
#  146|           if [ -x /sbin/route ]; then
#  147|->             grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
#  148|                   /sbin/route add -$args
#  149|               done

Error: SHELLCHECK_WARNING (CWE-156): [#def10]
/etc/rc.d/init.d/network:214:14: warning[SC2046]: Quote this to prevent word splitting.
#  212|       for i in $interfaces; do
#  213|           unset DEVICE TYPE
#  214|->         eval $(LANG=C grep -F "DEVICE=" ifcfg-$i)
#  215|           eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#  216|   

Error: SHELLCHECK_WARNING (CWE-156): [#def11]
/etc/rc.d/init.d/network:215:14: warning[SC2046]: Quote this to prevent word splitting.
#  213|           unset DEVICE TYPE
#  214|           eval $(LANG=C grep -F "DEVICE=" ifcfg-$i)
#  215|->         eval $(LANG=C grep -F "TYPE=" ifcfg-$i)
#  216|   
#  217|           if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi

Error: SHELLCHECK_WARNING (CWE-477): [#def12]
/etc/rc.d/init.d/network:231:32: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  229|               continue
#  230|           fi
#  231|->         if [ "$TYPE" = "xDSL"  -o  "$TYPE" = "Modem" ]; then
#  232|               xdslinterfaces="$xdslinterfaces $i"
#  233|               continue

Error: SHELLCHECK_WARNING (CWE-477): [#def13]
/etc/rc.d/init.d/network:236:44: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|           fi
#  235|   
#  236|->         if [ "${DEVICE%%.*}" != "$DEVICE"  -o  "${DEVICE##vlan}" != "$DEVICE" ] ; then
#  237|               vlaninterfaces="$vlaninterfaces $i"
#  238|               continue

Error: SHELLCHECK_WARNING (CWE-156): [#def14]
/etc/rc.d/init.d/network:271:10: warning[SC2046]: Quote this to prevent word splitting.
#  269|   
#  270|       echo $"Currently active devices:"
#  271|->     echo $(/sbin/ip -o link show up | awk -F ": " '{ print $2 }')
#  272|       ;;
#  273|   restart|force-reload)

Error: SHELLCHECK_WARNING (CWE-252): [#def15]
/etc/rc.d/init.d/network:274:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  272|       ;;
#  273|   restart|force-reload)
#  274|->     cd "$CWD"
#  275|       $0 stop
#  276|       $0 start

Error: SHELLCHECK_WARNING (CWE-252): [#def16]
/etc/sysconfig/network-scripts/ifdown:7:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    5|   . /etc/init.d/functions
#    6|   
#    7|-> cd /etc/sysconfig/network-scripts
#    8|   . ./network-functions
#    9|   

Error: SHELLCHECK_WARNING (CWE-477): [#def17]
/etc/sysconfig/network-scripts/ifdown:45:50: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   43|   fi
#   44|   
#   45|-> if [ -n "$IN_HOTPLUG" ] && [ "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ]
#   46|   then
#   47|       exit 0

Error: SHELLCHECK_WARNING (CWE-457): [#def18]
/etc/sysconfig/network-scripts/ifdown:50:13: warning[SC2154]: _use_nm is referenced but not assigned.
#   48|   fi
#   49|   
#   50|-> if is_true "$_use_nm"; then
#   51|       if [ -n "$UUID" -a -z "$DEVICE" ]; then
#   52|           DEVICE=$(nmcli -t --fields uuid,device con show --active | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")

Error: SHELLCHECK_WARNING (CWE-477): [#def19]
/etc/sysconfig/network-scripts/ifdown:51:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   49|   
#   50|   if is_true "$_use_nm"; then
#   51|->     if [ -n "$UUID" -a -z "$DEVICE" ]; then
#   52|           DEVICE=$(nmcli -t --fields uuid,device con show --active | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")
#   53|       fi

Error: SHELLCHECK_WARNING (CWE-252): [#def20]
/etc/sysconfig/network-scripts/ifdown-bnep:5:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   . /etc/init.d/functions
#    4|   
#    5|-> cd /etc/sysconfig/network-scripts
#    6|   . ./network-functions
#    7|   

Error: SHELLCHECK_WARNING (CWE-156): [#def21]
/etc/sysconfig/network-scripts/ifdown-bnep:21:16: warning[SC2046]: Quote this to prevent word splitting.
#   19|   stop_panu()
#   20|   {
#   21|->     kill -TERM $(cat /run/pand-${DEVICE}.pid)
#   22|   }
#   23|   

Error: SHELLCHECK_WARNING (CWE-156): [#def22]
/etc/sysconfig/network-scripts/ifdown-bnep:26:16: warning[SC2046]: Quote this to prevent word splitting.
#   24|   stop_nap()
#   25|   {
#   26|->     kill -TERM $(cat /run/pand-${DEVICE}.pid)
#   27|       /usr/bin/pand -K
#   28|   }

Error: SHELLCHECK_WARNING (CWE-252): [#def23]
/etc/sysconfig/network-scripts/ifdown-eth:20:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   18|   . /etc/init.d/functions
#   19|   
#   20|-> cd /etc/sysconfig/network-scripts
#   21|   . ./network-functions
#   22|   

Error: SHELLCHECK_WARNING (CWE-477): [#def24]
/etc/sysconfig/network-scripts/ifdown-eth:32:57: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   30|   
#   31|   # Check to make sure the device is actually up
#   32|-> check_device_down ${DEVICE} && [ "$BOOTPROTO" != "dhcp" -a "$BOOTPROTO" != "bootp" ] && [ -n "$VLAN" ] && ! is_true "$VLAN" && exit 0
#   33|   
#   34|   if [ -n "${TEAM_MASTER}" ] && [ ! "${DEVICETYPE}" = "TeamPort" ] && [ -x ./ifdown-TeamPort ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def25]
/etc/sysconfig/network-scripts/ifdown-eth:39:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   37|   
#   38|   if ! is_true "${SLAVE}" || [ -z "${MASTER}" ]; then
#   39|->     if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
#   40|           FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
#   41|           if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def26]
/etc/sysconfig/network-scripts/ifdown-eth:41:35: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   39|       if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
#   40|           FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
#   41|->         if [ -n "${FOUNDMACADDR}" -a "${FOUNDMACADDR}" != "${HWADDR}" ]; then
#   42|               NEWCONFIG=$(get_config_by_hwaddr ${FOUNDMACADDR})
#   43|               if [ -n "${NEWCONFIG}" ]; then

Error: SHELLCHECK_WARNING (CWE-156): [#def27]
/etc/sysconfig/network-scripts/ifdown-eth:44:22: warning[SC2046]: Quote this to prevent word splitting.
#   42|               NEWCONFIG=$(get_config_by_hwaddr ${FOUNDMACADDR})
#   43|               if [ -n "${NEWCONFIG}" ]; then
#   44|->                 eval $(LANG=C grep -F "DEVICE=" $NEWCONFIG)
#   45|               else
#   46|                   net_log $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring."

Error: SHELLCHECK_WARNING (CWE-477): [#def28]
/etc/sysconfig/network-scripts/ifdown-eth:49:36: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   47|                   exit 1
#   48|               fi
#   49|->             if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" -a "${DEVICE}" = "${REALDEVICE}" ]; then
#   50|                   exec /sbin/ifdown ${NEWCONFIG}
#   51|               else

Error: SHELLCHECK_WARNING (CWE-477): [#def29]
/etc/sysconfig/network-scripts/ifdown-eth:49:77: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   47|                   exit 1
#   48|               fi
#   49|->             if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" -a "${DEVICE}" = "${REALDEVICE}" ]; then
#   50|                   exec /sbin/ifdown ${NEWCONFIG}
#   51|               else

Error: SHELLCHECK_WARNING: [#def30]
/etc/sysconfig/network-scripts/ifdown-eth:136:33: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
#  134|       fi
#  135|   fi
#  136|-> [ "$retcode" = "0" ] && retcode=$?
#  137|   
#  138|   if [ -n "${BRIDGE}" ]; then

Error: SHELLCHECK_WARNING (CWE-156): [#def31]
/etc/sysconfig/network-scripts/ifdown-eth:142:46: warning[SC2046]: Quote this to prevent word splitting.
#  140|       # Upon removing a device from a bridge,
#  141|       # it's necessary to make radvd reload its config
#  142|->     [ -r /run/radvd/radvd.pid ] && kill -HUP $(cat /run/radvd/radvd.pid)
#  143|       if [ -d /sys/class/net/${BRIDGE}/brif ] && [ $(ls -1 /sys/class/net/${BRIDGE}/brif | wc -l) -eq 0 ]; then
#  144|           ip link del ${BRIDGE}

Error: SHELLCHECK_WARNING (CWE-156): [#def32]
/etc/sysconfig/network-scripts/ifdown-eth:143:50: warning[SC2046]: Quote this to prevent word splitting.
#  141|       # it's necessary to make radvd reload its config
#  142|       [ -r /run/radvd/radvd.pid ] && kill -HUP $(cat /run/radvd/radvd.pid)
#  143|->     if [ -d /sys/class/net/${BRIDGE}/brif ] && [ $(ls -1 /sys/class/net/${BRIDGE}/brif | wc -l) -eq 0 ]; then
#  144|           ip link del ${BRIDGE}
#  145|       fi

Error: SHELLCHECK_WARNING (CWE-156): [#def33]
/etc/sysconfig/network-scripts/ifdown-eth:184:10: warning[SC2046]: Quote this to prevent word splitting.
#  182|   
#  183|   if [ "${TYPE}" = "Veth" ]; then
#  184|->     if [ $(ip link show ${PEER} up | wc -l) -eq 0 ]; then
#  185|           ip link delete ${DEVICE}
#  186|       fi

Error: SHELLCHECK_WARNING (CWE-156): [#def34]
/etc/sysconfig/network-scripts/ifdown-ippp:14:14: warning[SC2046]: Quote this to prevent word splitting.
#   12|   # stopping ibod daemon for channel bundling
#   13|   if [ -f /var/lock/subsys/ibod ] ; then
#   14|->     kill -9  $(pidof ibod) >/dev/null 2>&1
#   15|       rm -f /var/lock/subsys/ibod
#   16|   fi

Error: SHELLCHECK_WARNING (CWE-252): [#def35]
/etc/sysconfig/network-scripts/ifdown-ipv6:41:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   39|   . /etc/sysconfig/network
#   40|   
#   41|-> cd /etc/sysconfig/network-scripts
#   42|   . ./network-functions
#   43|   

Error: SHELLCHECK_WARNING (CWE-477): [#def36]
/etc/sysconfig/network-scripts/ifdown-ipv6:60:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   58|   # Test device status
#   59|   ipv6_test_device_status $DEVICE
#   60|-> if [ $? != 0 -a $? != 11 ]; then
#   61|       # device doesn't exist or other problem occurs
#   62|       exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def37]
/etc/sysconfig/network-scripts/ifdown-ipv6:75:13: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   73|   # Test status of tun6to4 device
#   74|   ipv6_test_device_status tun6to4
#   75|-> if [ $? = 0 -o $? = 11 ]; then
#   76|       # Device exists
#   77|       valid6to4config="yes"

Error: SHELLCHECK_WARNING (CWE-477): [#def38]
/etc/sysconfig/network-scripts/ifdown-ipv6:107:30: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  105|       ipv4addr6to4local="$(ipv6_get_ipv4addr_of_tunnel tun6to4 local)"
#  106|   
#  107|->     if [ -z "$ipv4addrlocal" -o -z "$ipv4addr6to4local" ]; then
#  108|           # no IPv4 addresses given, 6to4 sure not configured
#  109|           valid6to4config="no"

Error: SHELLCHECK_WARNING (CWE-252): [#def39]
/etc/sysconfig/network-scripts/ifdown-post:5:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   # it is brought down explicitly.
#    4|   
#    5|-> cd /etc/sysconfig/network-scripts
#    6|   . ./network-functions
#    7|   

Error: SHELLCHECK_WARNING (CWE-563): [#def40]
/etc/sysconfig/network-scripts/ifdown-post:14:1: warning[SC2034]: CONFIG appears unused. Verify use (or export if used externally).
#   12|   fi
#   13|   
#   14|-> CONFIG=$1
#   15|   source_config
#   16|   

Error: SHELLCHECK_WARNING (CWE-477): [#def41]
/etc/sysconfig/network-scripts/ifdown-post:26:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   24|   
#   25|   if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}" && \
#   26|->     [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" \
#   27|       -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
#   28|       if [ -f /etc/resolv.conf.save ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def42]
/etc/sysconfig/network-scripts/ifdown-post:26:59: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   24|   
#   25|   if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}" && \
#   26|->     [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" \
#   27|       -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
#   28|       if [ -f /etc/resolv.conf.save ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def43]
/etc/sysconfig/network-scripts/ifdown-post:27:5: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   25|   if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}" && \
#   26|       [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" \
#   27|->     -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
#   28|       if [ -f /etc/resolv.conf.save ]; then
#   29|           change_resolv_conf /etc/resolv.conf.save

Error: SHELLCHECK_WARNING (CWE-477): [#def44]
/etc/sysconfig/network-scripts/ifdown-post:27:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   25|   if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}" && \
#   26|       [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" \
#   27|->     -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
#   28|       if [ -f /etc/resolv.conf.save ]; then
#   29|           change_resolv_conf /etc/resolv.conf.save

Error: SHELLCHECK_WARNING (CWE-477): [#def45]
/etc/sysconfig/network-scripts/ifdown-post:32:34: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   30|           rm -f /etc/resolv.conf.save
#   31|       fi
#   32|->     if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
#   33|           if [ -f /etc/ppp/peers/$DEVICE ] ; then
#   34|               rm -f /etc/ppp/peers/$DEVICE

Error: SHELLCHECK_WARNING (CWE-477): [#def46]
/etc/sysconfig/network-scripts/ifdown-post:42:35: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   40|   if ! check_default_route ; then
#   41|       # ISDN device needs special handling dial on demand
#   42|->     if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && \
#   43|          [ "$DIALMODE" = "auto" ] ; then
#   44|           if [ -z "$GATEWAY" ] ; then

Error: SHELLCHECK_WARNING (CWE-477): [#def47]
/etc/sysconfig/network-scripts/ifdown-routes:17:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   15|   # Routing rules
#   16|   FILES="/etc/sysconfig/network-scripts/rule-$1 /etc/sysconfig/network-scripts/rule6-$1"
#   17|-> if [ -n "$2" -a "$2" != "$1" ]; then
#   18|       FILES="$FILES /etc/sysconfig/network-scripts/rule-$2 /etc/sysconfig/network-scripts/rule6-$2"
#   19|   fi

Error: SHELLCHECK_WARNING (CWE-252): [#def48]
/etc/sysconfig/network-scripts/ifdown-sit:23:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   21|   . /etc/sysconfig/network
#   22|   
#   23|-> cd /etc/sysconfig/network-scripts
#   24|   . ./network-functions
#   25|   

Error: SHELLCHECK_WARNING (CWE-477): [#def49]
/etc/sysconfig/network-scripts/ifdown-sit:49:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   47|   # Test device status
#   48|   ipv6_test_device_status $DEVICE
#   49|-> if [ $? != 0 -a $? != 11 ]; then
#   50|       # device doesn't exist or other problem occurs
#   51|       exit 0

Error: SHELLCHECK_WARNING (CWE-252): [#def50]
/etc/sysconfig/network-scripts/ifdown-tunnel:25:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   23|   . /etc/init.d/functions
#   24|   
#   25|-> cd /etc/sysconfig/network-scripts
#   26|   . ./network-functions
#   27|   

Error: SHELLCHECK_WARNING (CWE-477): [#def51]
/etc/sysconfig/network-scripts/ifdown-tunnel:35:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   33|   
#   34|   # Generic tunnel devices are not supported here
#   35|-> if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 -o "$DEVICE" = ip6tnl0 ]; then
#   36|       net_log $"Device '$DEVICE' isn't supported as a valid GRE device name."
#   37|       exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def52]
/etc/sysconfig/network-scripts/ifdown-tunnel:35:44: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   33|   
#   34|   # Generic tunnel devices are not supported here
#   35|-> if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 -o "$DEVICE" = ip6tnl0 ]; then
#   36|       net_log $"Device '$DEVICE' isn't supported as a valid GRE device name."
#   37|       exit 1

Error: SHELLCHECK_WARNING (CWE-252): [#def53]
/etc/sysconfig/network-scripts/ifup:22:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   20|   . /etc/init.d/functions
#   21|   
#   22|-> cd /etc/sysconfig/network-scripts
#   23|   . ./network-functions
#   24|   

Error: SHELLCHECK_WARNING (CWE-477): [#def54]
/etc/sysconfig/network-scripts/ifup:69:23: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   67|       exit 0
#   68|   fi
#   69|-> if [ -n "$IN_HOTPLUG" -a "${TYPE}" = "Bridge" ]; 
#   70|   then
#   71|       exit 0

Error: SHELLCHECK_WARNING (CWE-457): [#def55]
/etc/sysconfig/network-scripts/ifup:74:13: warning[SC2154]: _use_nm is referenced but not assigned.
#   72|   fi
#   73|   
#   74|-> if is_true "$_use_nm" && [ -n "$UUID" ] && [ "$REALDEVICE" != "lo" ]; then
#   75|       if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]; then
#   76|           exit 0

Error: SHELLCHECK_WARNING (CWE-457): [#def56]
/etc/sysconfig/network-scripts/ifup:117:27: warning[SC2154]: alias is referenced but not assigned (for output from commands, use "$(alias ...)" ).
#  115|           is_available_wait ${PHYSDEV} ${DEVTIMEOUT} || {
#  116|               if [ "$?" = "1" ] ; then
#  117|->                 net_log $"$alias device ${DEVICE} does not seem to be present, delaying initialization."
#  118|                   exit 1
#  119|               else

Error: SHELLCHECK_WARNING (CWE-477): [#def57]
/etc/sysconfig/network-scripts/ifup:150:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  148|   fi
#  149|   
#  150|-> if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
#  151|       DYNCONFIG=true
#  152|   fi

Error: SHELLCHECK_WARNING (CWE-563): [#def58]
/etc/sysconfig/network-scripts/ifup:151:5: warning[SC2034]: DYNCONFIG appears unused. Verify use (or export if used externally).
#  149|   
#  150|   if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
#  151|->     DYNCONFIG=true
#  152|   fi
#  153|   

Error: SHELLCHECK_WARNING (CWE-563): [#def59]
/etc/sysconfig/network-scripts/ifup-aliases:62:1: warning[SC2034]: TEXTDOMAIN appears unused. Verify use (or export if used externally).
#   60|   #            modified by: Bill Nottingham <notting@redhat.com>
#   61|   
#   62|-> TEXTDOMAIN=initscripts
#   63|   TEXTDOMAINDIR=/etc/locale
#   64|   

Error: SHELLCHECK_WARNING (CWE-563): [#def60]
/etc/sysconfig/network-scripts/ifup-aliases:63:1: warning[SC2034]: TEXTDOMAINDIR appears unused. Verify use (or export if used externally).
#   61|   
#   62|   TEXTDOMAIN=initscripts
#   63|-> TEXTDOMAINDIR=/etc/locale
#   64|   
#   65|   device=$1

Error: SHELLCHECK_WARNING (CWE-252): [#def61]
/etc/sysconfig/network-scripts/ifup-aliases:74:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   72|   parent_device=$device
#   73|   
#   74|-> cd /etc/sysconfig/network-scripts  
#   75|   . ./network-functions
#   76|   

Error: SHELLCHECK_WARNING (CWE-156): [#def62]
/etc/sysconfig/network-scripts/ifup-aliases:89:6: warning[SC2046]: Quote this to prevent word splitting.
#   87|   # A list of all the devices is created in rdev_LIST.
#   88|   
#   89|-> eval $( ip addr show $device label $device:* | \
#   90|       awk 'BEGIN { COUNT=0;LAST_DEV="" } /inet / {
#   91|           # Split IP address into address/prefix

Error: SHELLCHECK_WARNING (CWE-156): [#def63]
/etc/sysconfig/network-scripts/ifup-aliases:111:6: warning[SC2046]: Quote this to prevent word splitting.
#  109|   
#  110|   # read from the /etc/sysconfig/network
#  111|-> eval ` (
#  112|       . /etc/sysconfig/network;
#  113|       echo network_GATEWAY=$GATEWAY\;;

Error: SHELLCHECK_WARNING (CWE-156): [#def64]
/etc/sysconfig/network-scripts/ifup-aliases:122:6: warning[SC2046]: Quote this to prevent word splitting.
#  120|       exit 1
#  121|   }
#  122|-> eval ` (
#  123|       . ./$PARENTCONFIG;
#  124|       echo default_PREFIX=$PREFIX\;;

Error: SHELLCHECK_WARNING (CWE-457): [#def65]
/etc/sysconfig/network-scripts/ifup-aliases:132:46: warning[SC2154]: network_GATEWAY is referenced but not assigned.
#  130|       echo default_ARPUPDATE=$ARPUPDATE\;;
#  131|   ) `
#  132|-> [ -z "$default_GATEWAY" ] && default_GATEWAY=$network_GATEWAY
#  133|   
#  134|   function ini_env ()

Error: SHELLCHECK_WARNING (CWE-457): [#def66]
/etc/sysconfig/network-scripts/ifup-aliases:139:12: warning[SC2154]: default_PREFIX is referenced but not assigned.
#  137|       IPADDR=""
#  138|       IPV6ADDR=""
#  139|->     PREFIX=$default_PREFIX
#  140|       NETMASK=$default_NETMASK
#  141|       BROADCAST=$default_BROADCAST

Error: SHELLCHECK_WARNING (CWE-457): [#def67]
/etc/sysconfig/network-scripts/ifup-aliases:140:13: warning[SC2154]: default_NETMASK is referenced but not assigned.
#  138|       IPV6ADDR=""
#  139|       PREFIX=$default_PREFIX
#  140|->     NETMASK=$default_NETMASK
#  141|       BROADCAST=$default_BROADCAST
#  142|       GATEWAY=$default_GATEWAY

Error: SHELLCHECK_WARNING (CWE-457): [#def68]
/etc/sysconfig/network-scripts/ifup-aliases:141:15: warning[SC2154]: default_BROADCAST is referenced but not assigned.
#  139|       PREFIX=$default_PREFIX
#  140|       NETMASK=$default_NETMASK
#  141|->     BROADCAST=$default_BROADCAST
#  142|       GATEWAY=$default_GATEWAY
#  143|       NO_ALIASROUTING=$default_NO_ALIASROUTING

Error: SHELLCHECK_WARNING (CWE-457): [#def69]
/etc/sysconfig/network-scripts/ifup-aliases:143:21: warning[SC2154]: default_NO_ALIASROUTING is referenced but not assigned.
#  141|       BROADCAST=$default_BROADCAST
#  142|       GATEWAY=$default_GATEWAY
#  143|->     NO_ALIASROUTING=$default_NO_ALIASROUTING
#  144|       ONPARENT=""
#  145|       ARPCHECK=$default_ARPCHECK

Error: SHELLCHECK_WARNING (CWE-457): [#def70]
/etc/sysconfig/network-scripts/ifup-aliases:145:14: warning[SC2154]: default_ARPCHECK is referenced but not assigned.
#  143|       NO_ALIASROUTING=$default_NO_ALIASROUTING
#  144|       ONPARENT=""
#  145|->     ARPCHECK=$default_ARPCHECK
#  146|       ARPUPDATE=$default_ARPUPDATE
#  147|   }

Error: SHELLCHECK_WARNING (CWE-457): [#def71]
/etc/sysconfig/network-scripts/ifup-aliases:146:15: warning[SC2154]: default_ARPUPDATE is referenced but not assigned.
#  144|       ONPARENT=""
#  145|       ARPCHECK=$default_ARPCHECK
#  146|->     ARPUPDATE=$default_ARPUPDATE
#  147|   }
#  148|   

Error: SHELLCHECK_WARNING (CWE-477): [#def72]
/etc/sysconfig/network-scripts/ifup-aliases:188:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  186|       fi
#  187|   
#  188|->     if [ -z "$DEVICE" -o -z "$IPADDR" ]; then
#  189|           if [ -n "$IPV6ADDR" -a -n "$DEVICE" ] && ! is_false "$IPV6INIT"; then
#  190|               /etc/sysconfig/network-scripts/ifup-ipv6 ${DEVICE}

Error: SHELLCHECK_WARNING (CWE-477): [#def73]
/etc/sysconfig/network-scripts/ifup-aliases:189:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  187|   
#  188|       if [ -z "$DEVICE" -o -z "$IPADDR" ]; then
#  189|->         if [ -n "$IPV6ADDR" -a -n "$DEVICE" ] && ! is_false "$IPV6INIT"; then
#  190|               /etc/sysconfig/network-scripts/ifup-ipv6 ${DEVICE}
#  191|               return $?

Error: SHELLCHECK_WARNING (CWE-477): [#def74]
/etc/sysconfig/network-scripts/ifup-aliases:197:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  195|       fi
#  196|   
#  197|->     if [ -z "$NETMASK" -a -z "$PREFIX" ]; then
#  198|           net_log $"error iN $FILE: didn't specify netmask or prefix"
#  199|       fi

Error: SHELLCHECK_WARNING (CWE-156): [#def75]
/etc/sysconfig/network-scripts/ifup-aliases:202:14: warning[SC2046]: Quote this to prevent word splitting.
#  200|   
#  201|       if [ -z "$PREFIX" ]; then
#  202|->         eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK})
#  203|       fi
#  204|   

Error: SHELLCHECK_WARNING (CWE-477): [#def76]
/etc/sysconfig/network-scripts/ifup-aliases:205:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  203|       fi
#  204|   
#  205|->     if [ -z "$BROADCAST" -o "$BROADCAST" = "$default_BROADCAST" ]; then
#  206|           eval $(/bin/ipcalc --broadcast ${IPADDR}/${PREFIX})
#  207|       fi

Error: SHELLCHECK_WARNING (CWE-156): [#def77]
/etc/sysconfig/network-scripts/ifup-aliases:206:14: warning[SC2046]: Quote this to prevent word splitting.
#  204|   
#  205|       if [ -z "$BROADCAST" -o "$BROADCAST" = "$default_BROADCAST" ]; then
#  206|->         eval $(/bin/ipcalc --broadcast ${IPADDR}/${PREFIX})
#  207|       fi
#  208|   

Error: SHELLCHECK_WARNING (CWE-457): [#def78]
/etc/sysconfig/network-scripts/ifup-aliases:209:17: warning[SC2154]: no_devices_are_up is referenced but not assigned.
#  207|       fi
#  208|   
#  209|->     if is_true "$no_devices_are_up"; then
#  210|           setup_this=yes
#  211|       else

Error: SHELLCHECK_WARNING (CWE-457): [#def79]
/etc/sysconfig/network-scripts/ifup-aliases:225:23: warning[SC2154]: rdev_pb is referenced but not assigned.
#  223|               if [ "$rdev_addr" = "${IPADDR}" ]; then
#  224|                   newmark=keep
#  225|->                 if [ "$rdev_pb" != "${PREFIX}_${BROADCAST}" ]; then
#  226|                       setup_this=freshen
#  227|                   else

Error: SHELLCHECK_WARNING (CWE-477): [#def80]
/etc/sysconfig/network-scripts/ifup-aliases:237:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  235|                   setup_this=yes
#  236|               fi
#  237|->             if [ -n "$rdev_mark" -a "$rdev_mark" != "$newmark" ]; then
#  238|                   net_log $"error in ifcfg-${parent_device}: files"
#  239|                   return 1

Error: SHELLCHECK_WARNING (CWE-477): [#def81]
/etc/sysconfig/network-scripts/ifup-aliases:246:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  244|           fi
#  245|   
#  246|->         if [ -n "$rdevip" -a "$rdevip" != "${DEVNUM}" ]; then
#  247|               eval " mark_remove=\$rdev_${rdevip}_mark ";
#  248|               if [ -n "$mark_remove" -a "$mark_remove" != "remove" ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def82]
/etc/sysconfig/network-scripts/ifup-aliases:248:36: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  246|           if [ -n "$rdevip" -a "$rdevip" != "${DEVNUM}" ]; then
#  247|               eval " mark_remove=\$rdev_${rdevip}_mark ";
#  248|->             if [ -n "$mark_remove" -a "$mark_remove" != "remove" ]; then
#  249|                   net_log $"error in ifcfg-${parent_device}: files"
#  250|                   return 1

Error: SHELLCHECK_WARNING (CWE-457): [#def83]
/etc/sysconfig/network-scripts/ifup-aliases:293:24: warning[SC2154]: network_GATEWAYDEV is referenced but not assigned.
#  291|           if ! is_true "$NO_ALIASROUTING"; then
#  292|   
#  293|->             GATEWAYDEV=$network_GATEWAYDEV;
#  294|   
#  295|               if [ -n "${GATEWAY}" -a \

Error: SHELLCHECK_WARNING (CWE-477): [#def84]
/etc/sysconfig/network-scripts/ifup-aliases:295:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  293|               GATEWAYDEV=$network_GATEWAYDEV;
#  294|   
#  295|->             if [ -n "${GATEWAY}" -a \
#  296|                       \( -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${DEVICE}" \) ]; then
#  297|                   # set up default gateway, if it isn't already there

Error: SHELLCHECK_WARNING (CWE-477): [#def85]
/etc/sysconfig/network-scripts/ifup-aliases:296:43: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  294|   
#  295|               if [ -n "${GATEWAY}" -a \
#  296|->                     \( -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${DEVICE}" \) ]; then
#  297|                   # set up default gateway, if it isn't already there
#  298|                   if ! is_default_gateway "$GATEWAY"; then

Error: SHELLCHECK_WARNING (CWE-670): [#def86]
/etc/sysconfig/network-scripts/ifup-aliases:310:7: warning[SC2128]: Expanding an array without an index only gives the first element.
#  308|   }
#  309|   
#  310|-> if [ "$BASH_VERSINFO" ]; then
#  311|       shopt -s nullglob
#  312|   else

Error: SHELLCHECK_WARNING (CWE-563): [#def87]
/etc/sysconfig/network-scripts/ifup-aliases:313:5: warning[SC2034]: allow_null_glob_expansion appears unused. Verify use (or export if used externally).
#  311|       shopt -s nullglob
#  312|   else
#  313|->     allow_null_glob_expansion=foo
#  314|   fi
#  315|   

Error: SHELLCHECK_WARNING (CWE-457): [#def88]
/etc/sysconfig/network-scripts/ifup-aliases:360:15: warning[SC2154]: rdev_LIST is referenced but not assigned.
#  358|   # Remove any devices that should not be around
#  359|   #
#  360|-> for DEVNUM in $rdev_LIST ; do
#  361|       eval " rdev_mark=\$rdev_${DEVNUM}_mark "
#  362|       if [ -z "$rdev_mark" ]; then

Error: SHELLCHECK_WARNING (CWE-252): [#def89]
/etc/sysconfig/network-scripts/ifup-bnep:5:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    3|   . /etc/init.d/functions
#    4|   
#    5|-> cd /etc/sysconfig/network-scripts
#    6|   . ./network-functions
#    7|   

Error: SHELLCHECK_WARNING (CWE-477): [#def90]
/etc/sysconfig/network-scripts/ifup-bnep:22:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   20|   {
#   21|       PANDARGS="--persist --pidfile=/run/pand-${DEVICE}.pid --ethernet=${DEVICE} --autozap"
#   22|->     [ "${CACHE}" != "no" -a "${CACHE}" != "NO" ] && PANDARGS="${PANDARGS} --cache"
#   23|       if [ "${REMOTEBDADDR}" = "" ]; then
#   24|           PANDARGS="${PANDARGS} --search"

Error: SHELLCHECK_WARNING (CWE-252): [#def91]
/etc/sysconfig/network-scripts/ifup-eth:20:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   18|   . /etc/init.d/functions
#   19|   
#   20|-> cd /etc/sysconfig/network-scripts
#   21|   . ./network-functions
#   22|   

Error: SHELLCHECK_WARNING (CWE-477): [#def92]
/etc/sysconfig/network-scripts/ifup-eth:31:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   29|   source_config
#   30|   
#   31|-> if [ "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ]; then
#   32|       DYNCONFIG=true
#   33|   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def93]
/etc/sysconfig/network-scripts/ifup-eth:42:43: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   40|   if [ -n "${HWADDR}" ]; then
#   41|       FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
#   42|->     if [ "${FOUNDMACADDR}" != "${HWADDR}" -a "${FOUNDMACADDR}" != "${MACADDR}" ]; then
#   43|           net_log $"Device ${DEVICE} has different MAC address than expected, ignoring."
#   44|           exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def94]
/etc/sysconfig/network-scripts/ifup-eth:82:45: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   80|           key=${arg%%=*};
#   81|           value=${arg##*=};
#   82|->         if [ "${key}" != "multicast_router" -a "${key}" != "hash_max" -a "${key}" != "multicast_snooping" ]; then
#   83|               echo $value > /sys/class/net/${DEVICE}/bridge/$key
#   84|           fi

Error: SHELLCHECK_WARNING (CWE-477): [#def95]
/etc/sysconfig/network-scripts/ifup-eth:82:71: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   80|           key=${arg%%=*};
#   81|           value=${arg##*=};
#   82|->         if [ "${key}" != "multicast_router" -a "${key}" != "hash_max" -a "${key}" != "multicast_snooping" ]; then
#   83|               echo $value > /sys/class/net/${DEVICE}/bridge/$key
#   84|           fi

Error: SHELLCHECK_WARNING (CWE-156): [#def96]
/etc/sysconfig/network-scripts/ifup-eth:214:46: warning[SC2046]: Quote this to prevent word splitting.
#  212|       # Upon adding a device to a bridge,
#  213|       # it's necessary to make radvd reload its config
#  214|->     [ -r /run/radvd/radvd.pid ] && kill -HUP $(cat /run/radvd/radvd.pid)
#  215|       exit 0
#  216|   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def97]
/etc/sysconfig/network-scripts/ifup-eth:255:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  253|       # end dynamic device configuration
#  254|   else 
#  255|->     if [ -z "${IPADDR}" -a -z "${IPADDR0}" -a -z "${IPADDR1}" -a -z "${IPADDR2}" ]; then
#  256|           # enable device without IP, useful for e.g. PPPoE
#  257|           set_link_up ${REALDEVICE}

Error: SHELLCHECK_WARNING (CWE-477): [#def98]
/etc/sysconfig/network-scripts/ifup-eth:255:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  253|       # end dynamic device configuration
#  254|   else 
#  255|->     if [ -z "${IPADDR}" -a -z "${IPADDR0}" -a -z "${IPADDR1}" -a -z "${IPADDR2}" ]; then
#  256|           # enable device without IP, useful for e.g. PPPoE
#  257|           set_link_up ${REALDEVICE}

Error: SHELLCHECK_WARNING (CWE-477): [#def99]
/etc/sysconfig/network-scripts/ifup-eth:255:63: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  253|       # end dynamic device configuration
#  254|   else 
#  255|->     if [ -z "${IPADDR}" -a -z "${IPADDR0}" -a -z "${IPADDR1}" -a -z "${IPADDR2}" ]; then
#  256|           # enable device without IP, useful for e.g. PPPoE
#  257|           set_link_up ${REALDEVICE}

Error: SHELLCHECK_WARNING (CWE-156): [#def100]
/etc/sysconfig/network-scripts/ifup-eth:265:43: warning[SC2046]: Quote this to prevent word splitting.
#  263|   
#  264|           [ -n "${ARP}" ] && \
#  265|->             ip link set dev ${REALDEVICE} $(toggle_value arp $ARP)
#  266|   
#  267|           if ! set_link_up ${REALDEVICE} ; then

Error: SHELLCHECK_WARNING (CWE-457): [#def101]
/etc/sysconfig/network-scripts/ifup-eth:294:88: warning[SC2154]: prefix is referenced but not assigned.
#  292|               fi
#  293|   
#  294|->             if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${ipaddr[$idx]}/${prefix[$idx]}" ; then
#  295|                   if [ "${REALDEVICE}" != "lo" ] && ! is_false "${arpcheck[$idx]}"; then
#  296|                       ARPING=$(/sbin/arping -c 2 -w ${ARPING_WAIT:-3} -D -I ${REALDEVICE} ${ipaddr[$idx]})

Error: SHELLCHECK_WARNING (CWE-457): [#def102]
/etc/sysconfig/network-scripts/ifup-eth:295:63: warning[SC2154]: arpcheck is referenced but not assigned.
#  293|   
#  294|               if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${ipaddr[$idx]}/${prefix[$idx]}" ; then
#  295|->                 if [ "${REALDEVICE}" != "lo" ] && ! is_false "${arpcheck[$idx]}"; then
#  296|                       ARPING=$(/sbin/arping -c 2 -w ${ARPING_WAIT:-3} -D -I ${REALDEVICE} ${ipaddr[$idx]})
#  297|                       if [ $? = 1 ]; then

Error: SHELLCHECK_WARNING (CWE-457): [#def103]
/etc/sysconfig/network-scripts/ifup-eth:315:28: warning[SC2154]: arpupdate is referenced but not assigned.
#  313|   
#  314|               # update ARP cache of neighboring computers
#  315|->             if ! is_false "${arpupdate[$idx]}" && [ "${REALDEVICE}" != "lo" ]; then
#  316|                   /sbin/arping -q -A -c 1 -w ${ARPING_UPDATE_WAIT:-3} -I ${REALDEVICE} ${ipaddr[$idx]}
#  317|                   ( sleep 2;

Error: SHELLCHECK_WARNING (CWE-477): [#def104]
/etc/sysconfig/network-scripts/ifup-eth:326:61: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  324|   
#  325|           # Set a default route.
#  326|->         if ! is_false "${DEFROUTE}" && [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${REALDEVICE}" ]; then
#  327|               # set up default gateway. replace if one already exists
#  328|               if [ -n "${GATEWAY}" ] && [ "$(ipcalc --network ${GATEWAY} ${netmask[0]} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then

Error: SHELLCHECK_WARNING (CWE-457): [#def105]
/etc/sysconfig/network-scripts/ifup-eth:328:72: warning[SC2154]: netmask is referenced but not assigned.
#  326|           if ! is_false "${DEFROUTE}" && [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${REALDEVICE}" ]; then
#  327|               # set up default gateway. replace if one already exists
#  328|->             if [ -n "${GATEWAY}" ] && [ "$(ipcalc --network ${GATEWAY} ${netmask[0]} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then
#  329|                   ip route replace default ${METRIC:+metric $METRIC} \
#  330|                       ${EXTRA_ROUTE_OPTS} \

Error: SHELLCHECK_WARNING (CWE-477): [#def106]
/etc/sysconfig/network-scripts/ifup-eth:353:44: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  351|           key=${arg%%=*};
#  352|           value=${arg##*=};
#  353|->         if [ "${key}" = "multicast_router" -o "${key}" = "hash_max" -o "${key}" = "multicast_snooping" ]; then
#  354|               echo $value > /sys/class/net/${DEVICE}/bridge/$key
#  355|           fi

Error: SHELLCHECK_WARNING (CWE-477): [#def107]
/etc/sysconfig/network-scripts/ifup-eth:353:69: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  351|           key=${arg%%=*};
#  352|           value=${arg##*=};
#  353|->         if [ "${key}" = "multicast_router" -o "${key}" = "hash_max" -o "${key}" = "multicast_snooping" ]; then
#  354|               echo $value > /sys/class/net/${DEVICE}/bridge/$key
#  355|           fi

Error: SHELLCHECK_WARNING (CWE-477): [#def108]
/etc/sysconfig/network-scripts/ifup-eth:392:37: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  390|       else
#  391|           echo $" failed."
#  392|->         if [ "${dhcpipv4}" = "good" -o -n "${IPADDR}" ]; then
#  393|               net_log "Unable to obtain IPv6 DHCP address ${DEVICE}." warning
#  394|           else

Error: SHELLCHECK_WARNING (CWE-252): [#def109]
/etc/sysconfig/network-scripts/ifup-ippp:9:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    7|   . /etc/init.d/functions
#    8|   
#    9|-> cd /etc/sysconfig/network-scripts
#   10|   . ./network-functions
#   11|   

Error: SHELLCHECK_WARNING (CWE-477): [#def110]
/etc/sysconfig/network-scripts/ifup-ippp:22:22: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   20|   source_config
#   21|   
#   22|-> if [ "${2}" = "boot" -a "${ONBOOT}" = "no" ]; then
#   23|       exit
#   24|   fi

Error: SHELLCHECK_WARNING (CWE-569): [#def111]
/etc/sysconfig/network-scripts/ifup-ippp:61:14: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#   59|   {
#   60|       net_log $"$*" info ifup-ippp
#   61|->     isdnctrl $* >/dev/null 2>&1 || exit 1
#   62|   }
#   63|   

Error: SHELLCHECK_WARNING (CWE-685): [#def112]
/etc/sysconfig/network-scripts/ifup-ippp:84:1: warning[SC2120]: addprovider references arguments, but none are ever passed.
#   82|   }
#   83|   
#   84|-> function addprovider()
#   85|   {
#   86|       options=

Error: SHELLCHECK_WARNING (CWE-477): [#def113]
/etc/sysconfig/network-scripts/ifup-ippp:98:24: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   96|       [ -z "$DIALMODE" ] && DIALMODE="off"
#   97|   
#   98|->     [ "$AUTH" = "none" -o "$AUTH" = "noauth" -o -z "$AUTH" ] && AUTH="-pap -chap"
#   99|   
#  100|       # set layer-2/3 protocol 

Error: SHELLCHECK_WARNING (CWE-477): [#def114]
/etc/sysconfig/network-scripts/ifup-ippp:98:46: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   96|       [ -z "$DIALMODE" ] && DIALMODE="off"
#   97|   
#   98|->     [ "$AUTH" = "none" -o "$AUTH" = "noauth" -o -z "$AUTH" ] && AUTH="-pap -chap"
#   99|   
#  100|       # set layer-2/3 protocol 

Error: SHELLCHECK_WARNING (CWE-477): [#def115]
/etc/sysconfig/network-scripts/ifup-ippp:175:30: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  173|   
#  174|       # set callback
#  175|->     if [ "$CALLBACK" = "out" -o "$CALLBACK" = "in" ] ; then
#  176|           log_isdnctrl callback $DEVICE $CALLBACK
#  177|       else

Error: SHELLCHECK_WARNING (CWE-477): [#def116]
/etc/sysconfig/network-scripts/ifup-ippp:327:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  325|   
#  326|       # check dns entry
#  327|->     if [ -z "$DNS1" -a -z "$DNS2" ]; then
#  328|           options="$options ms-get-dns"
#  329|       else

Error: SHELLCHECK_WARNING (CWE-457): [#def117]
/etc/sysconfig/network-scripts/ifup-ippp:349:34: warning[SC2154]: netmask is referenced but not assigned (did you mean 'NETMASK'?).
#  347|       if [ "$ENCAP" = "syncppp" ]; then
#  348|           # start ipppd daemon
#  349|->         net_log $"ipppd $options $netmask" info ifup-ippp
#  350|           ipppd $options $netmask >/dev/null 2>&1
#  351|   

Error: SHELLCHECK_WARNING (CWE-252): [#def118]
/etc/sysconfig/network-scripts/ifup-ipv6:58:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   56|   . /etc/sysconfig/network
#   57|   
#   58|-> cd /etc/sysconfig/network-scripts
#   59|   . ./network-functions
#   60|   

Error: SHELLCHECK_WARNING (CWE-477): [#def119]
/etc/sysconfig/network-scripts/ifup-ipv6:80:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   78|   # Test device status
#   79|   ipv6_test_device_status $DEVICE
#   80|-> if [ $? != 0 -a $? != 11 ]; then
#   81|       # device doesn't exist or other problem occurs
#   82|       exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def120]
/etc/sysconfig/network-scripts/ifup-ipv6:163:28: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  161|   
#  162|   # Setup default IPv6 route, check are done by function
#  163|-> if [ -n "$IPV6_DEFAULTDEV" -o -n "$IPV6_DEFAULTGW" ]; then
#  164|       ipv6_set_default_route "$IPV6_DEFAULTGW" "$IPV6_DEFAULTDEV" "$DEVICE"
#  165|   fi

Error: SHELLCHECK_WARNING (CWE-563): [#def121]
/etc/sysconfig/network-scripts/ifup-ipv6:258:88: warning[SC2034]: device appears unused. Verify use (or export if used externally).
#  256|           # Add static routes
#  257|           if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
#  258|->             LC_ALL=C grep -w "^tun6to4" /etc/sysconfig/static-routes-ipv6 | while read device network gateway; do
#  259|                   if [ -z "$network" ]; then
#  260|                       continue

Error: SHELLCHECK_WARNING (CWE-252): [#def122]
/etc/sysconfig/network-scripts/ifup-plip:3:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    1|   #!/usr/bin/sh
#    2|   
#    3|-> cd /etc/sysconfig/network-scripts
#    4|   . ./network-functions
#    5|   

Error: SHELLCHECK_WARNING (CWE-563): [#def123]
/etc/sysconfig/network-scripts/ifup-plip:6:1: warning[SC2034]: CONFIG appears unused. Verify use (or export if used externally).
#    4|   . ./network-functions
#    5|   
#    6|-> CONFIG=$1
#    7|   source_config
#    8|   

Error: SHELLCHECK_WARNING (CWE-477): [#def124]
/etc/sysconfig/network-scripts/ifup-plip:9:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#    7|   source_config
#    8|   
#    9|-> if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then
#   10|       exit
#   11|   fi

Error: SHELLCHECK_WARNING (CWE-156): [#def125]
/etc/sysconfig/network-scripts/ifup-plip:13:26: warning[SC2046]: Quote this to prevent word splitting.
#   11|   fi
#   12|   
#   13|-> [ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK})
#   14|   ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} dev ${DEVICE}
#   15|   set_link_up ${DEVICE}

Error: SHELLCHECK_WARNING (CWE-477): [#def126]
/etc/sysconfig/network-scripts/ifup-plip:21:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   19|   
#   20|   if [ "${GATEWAY}" != "" ]; then
#   21|->     if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
#   22|           # set up default gateway
#   23|           ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY}

Error: SHELLCHECK_WARNING (CWE-252): [#def127]
/etc/sysconfig/network-scripts/ifup-plusb:14:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   12|   #
#   13|   
#   14|-> cd /etc/sysconfig/network-scripts
#   15|   . ./network-functions
#   16|   

Error: SHELLCHECK_WARNING (CWE-563): [#def128]
/etc/sysconfig/network-scripts/ifup-plusb:17:1: warning[SC2034]: CONFIG appears unused. Verify use (or export if used externally).
#   15|   . ./network-functions
#   16|   
#   17|-> CONFIG=$1
#   18|   source_config
#   19|   

Error: SHELLCHECK_WARNING (CWE-477): [#def129]
/etc/sysconfig/network-scripts/ifup-plusb:20:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   18|   source_config
#   19|   
#   20|-> if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]
#   21|   then
#   22|       exit

Error: SHELLCHECK_WARNING (CWE-156): [#def130]
/etc/sysconfig/network-scripts/ifup-plusb:25:26: warning[SC2046]: Quote this to prevent word splitting.
#   23|   fi
#   24|   
#   25|-> [ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK})
#   26|   
#   27|   if [ ${BROADCAST} != ""  ]  ; then

Error: SHELLCHECK_WARNING (CWE-477): [#def131]
/etc/sysconfig/network-scripts/ifup-plusb:37:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   35|   
#   36|   if [ "${GATEWAY}" != "" ]; then
#   37|->     if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
#   38|           # set up default gateway
#   39|           ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY}

Error: SHELLCHECK_WARNING (CWE-252): [#def132]
/etc/sysconfig/network-scripts/ifup-post:6:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    4|   . /etc/init.d/functions
#    5|   
#    6|-> cd /etc/sysconfig/network-scripts
#    7|   . ./network-functions
#    8|   

Error: SHELLCHECK_WARNING (CWE-563): [#def133]
/etc/sysconfig/network-scripts/ifup-post:76:34: warning[SC2034]: search appears unused. Verify use (or export if used externally).
#   74|                       domain* | search*)
#   75|                           if [ -n "${DOMAIN}" ]; then
#   76|->                             read search value < <(echo ${line})
#   77|                               search_str+=" ${value}"
#   78|                           else

Error: SHELLCHECK_WARNING (CWE-477): [#def134]
/etc/sysconfig/network-scripts/ifup-post:122:20: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  120|   
#  121|   # don't set hostname on ppp/slip connections
#  122|-> if [ "$2" = "boot" -a \
#  123|           "${DEVICE}" != lo -a \
#  124|           "${DEVICETYPE}" != "ppp" -a \

Error: SHELLCHECK_WARNING (CWE-477): [#def135]
/etc/sysconfig/network-scripts/ifup-post:123:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  121|   # don't set hostname on ppp/slip connections
#  122|   if [ "$2" = "boot" -a \
#  123|->         "${DEVICE}" != lo -a \
#  124|           "${DEVICETYPE}" != "ppp" -a \
#  125|           "${DEVICETYPE}" != "slip" ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def136]
/etc/sysconfig/network-scripts/ifup-post:124:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  122|   if [ "$2" = "boot" -a \
#  123|           "${DEVICE}" != lo -a \
#  124|->         "${DEVICETYPE}" != "ppp" -a \
#  125|           "${DEVICETYPE}" != "slip" ]; then
#  126|       if need_hostname; then

Error: SHELLCHECK_WARNING (CWE-156): [#def137]
/etc/sysconfig/network-scripts/ifup-post:128:14: warning[SC2046]: Quote this to prevent word splitting.
#  126|       if need_hostname; then
#  127|           IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }')
#  128|->         eval $(/bin/ipcalc --silent --hostname ${IPADDR} ; echo "status=$?")
#  129|           if [ "$status" = "0" ]; then
#  130|               set_hostname $HOSTNAME

Error: SHELLCHECK_WARNING (CWE-457): [#def138]
/etc/sysconfig/network-scripts/ifup-post:129:15: warning[SC2154]: status is referenced but not assigned.
#  127|           IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }')
#  128|           eval $(/bin/ipcalc --silent --hostname ${IPADDR} ; echo "status=$?")
#  129|->         if [ "$status" = "0" ]; then
#  130|               set_hostname $HOSTNAME
#  131|           fi

Error: SHELLCHECK_WARNING (CWE-156): [#def139]
/etc/sysconfig/network-scripts/ifup-routes:25:14: warning[SC2046]: Quote this to prevent word splitting.
#   23|           
#   24|       while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
#   25|->         eval $(ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum))
#   26|           line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
#   27|           if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then

Error: SHELLCHECK_WARNING (CWE-156): [#def140]
/etc/sysconfig/network-scripts/ifup-routes:25:26: warning[SC2046]: Quote this to prevent word splitting.
#   23|           
#   24|       while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
#   25|->         eval $(ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum))
#   26|           line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
#   27|           if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then

Error: SHELLCHECK_WARNING (CWE-156): [#def141]
/etc/sysconfig/network-scripts/ifup-routes:25:59: warning[SC2046]: Quote this to prevent word splitting.
#   23|           
#   24|       while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
#   25|->         eval $(ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum))
#   26|           line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
#   27|           if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then

Error: SHELLCHECK_WARNING (CWE-480): [#def142]
/etc/sysconfig/network-scripts/ifup-routes:42:20: warning[SC1007]: Remove space after = if trying to assign a value (for empty string, use var='' ... ).
#   40|   
#   41|   handle_ip_file() {
#   42|->     local f t type= file=$1 proto="-4"
#   43|       f=${file##*/}
#   44|       t=${f%%-*}

Error: SHELLCHECK_WARNING (CWE-477): [#def143]
/etc/sysconfig/network-scripts/ifup-routes:62:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   60|   
#   61|   FILES="/etc/sysconfig/network-scripts/route-$1 /etc/sysconfig/network-scripts/route6-$1"
#   62|-> if [ -n "$2" -a "$2" != "$1" ]; then
#   63|       FILES="$FILES /etc/sysconfig/network-scripts/route-$2 /etc/sysconfig/network-scripts/route6-$2"
#   64|   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def144]
/etc/sysconfig/network-scripts/ifup-routes:87:14: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   85|   # Routing rules
#   86|   FILES="/etc/sysconfig/network-scripts/rule-$1 /etc/sysconfig/network-scripts/rule6-$1"
#   87|-> if [ -n "$2" -a "$2" != "$1" ]; then
#   88|       FILES="$FILES /etc/sysconfig/network-scripts/rule-$2 /etc/sysconfig/network-scripts/rule6-$2"
#   89|   fi

Error: SHELLCHECK_WARNING (CWE-252): [#def145]
/etc/sysconfig/network-scripts/ifup-sit:35:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   33|   . /etc/sysconfig/network
#   34|   
#   35|-> cd /etc/sysconfig/network-scripts
#   36|   . ./network-functions
#   37|   

Error: SHELLCHECK_WARNING (CWE-477): [#def146]
/etc/sysconfig/network-scripts/ifup-sit:96:28: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   94|   
#   95|   # Setup default IPv6 route, check are done by function
#   96|-> if [ -n "$IPV6_DEFAULTDEV" -o -n "$IPV6_DEFAULTGW" ]; then
#   97|       ipv6_set_default_route "$IPV6_DEFAULTGW" "$IPV6_DEFAULTDEV" "$DEVICE"
#   98|   fi

Error: SHELLCHECK_WARNING (CWE-563): [#def147]
/etc/sysconfig/network-scripts/ifup-sit:102:80: warning[SC2034]: device appears unused. Verify use (or export if used externally).
#  100|   # Setup additional static IPv6 routes on specified interface, if given
#  101|   if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
#  102|->     LC_ALL=C grep -w "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device ipv6route args; do
#  103|       ipv6_add_route $ipv6route :: $DEVICE
#  104|   done

Error: SHELLCHECK_WARNING (CWE-563): [#def148]
/etc/sysconfig/network-scripts/ifup-sit:102:97: warning[SC2034]: args appears unused. Verify use (or export if used externally).
#  100|   # Setup additional static IPv6 routes on specified interface, if given
#  101|   if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
#  102|->     LC_ALL=C grep -w "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device ipv6route args; do
#  103|       ipv6_add_route $ipv6route :: $DEVICE
#  104|   done

Error: SHELLCHECK_WARNING (CWE-252): [#def149]
/etc/sysconfig/network-scripts/ifup-tunnel:25:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   23|   . /etc/init.d/functions
#   24|   
#   25|-> cd /etc/sysconfig/network-scripts
#   26|   . ./network-functions
#   27|   

Error: SHELLCHECK_WARNING (CWE-477): [#def150]
/etc/sysconfig/network-scripts/ifup-tunnel:67:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   65|   
#   66|   # Generic tunnel devices are not supported here
#   67|-> if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 -o "$DEVICE" = ip6tnl0 ]; then
#   68|       net_log $"Device '$DEVICE' isn't supported as a valid GRE device name."
#   69|       exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def151]
/etc/sysconfig/network-scripts/ifup-tunnel:67:44: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   65|   
#   66|   # Generic tunnel devices are not supported here
#   67|-> if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 -o "$DEVICE" = ip6tnl0 ]; then
#   68|       net_log $"Device '$DEVICE' isn't supported as a valid GRE device name."
#   69|       exit 1

Error: SHELLCHECK_WARNING (CWE-252): [#def152]
/etc/sysconfig/network-scripts/ifup-wireless:29:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   27|   # Only meant to be called from ifup.
#   28|   
#   29|-> cd /etc/sysconfig/network-scripts
#   30|   . ./network-functions
#   31|   

Error: SHELLCHECK_WARNING (CWE-477): [#def153]
/etc/sysconfig/network-scripts/ifup-wireless:46:22: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   44|       ;;
#   45|   ad-hoc)
#   46|->     if [ -n "$ESSID" -a -n "$FREQ" ]; then
#   47|           $IW dev "$DEVICE" set type ibss
#   48|           $IW dev "$DEVICE" ibss join "$ESSID" "$FREQ" $KEYS

Error: SHELLCHECK_WARNING (CWE-252): [#def154]
/etc/sysconfig/network-scripts/init.ipv6-global:33:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   31|   . /etc/sysconfig/network
#   32|   
#   33|-> cd /etc/sysconfig/network-scripts
#   34|   . ./network-functions
#   35|   

Error: SHELLCHECK_WARNING (CWE-252): [#def155]
/usr/libexec/import-state:6:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#    4|   # Copy state into root folder:
#    5|   # ============================
#    6|-> cd /run/initramfs/state
#    7|   
#    8|   IFS_backup=$IFS

Error: SHELLCHECK_WARNING (CWE-252): [#def156]
/usr/libexec/import-state:14:3: warning[SC2164]: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.
#   12|   
#   13|   for dir in $dirs_found; do
#   14|->   pushd "$dir" > /dev/null
#   15|   
#   16|     # Remove initial '.' char from the find's result:

Error: SHELLCHECK_WARNING (CWE-252): [#def157]
/usr/libexec/import-state:29:3: warning[SC2164]: Use 'popd ... || exit' or 'popd ... || return' in case popd fails.
#   27|     find . -mindepth 1 -maxdepth 1 -not -type d -exec cp -av -t "$dest_dir" {} \; > /dev/null
#   28|   
#   29|->   popd > /dev/null
#   30|   done
#   31|   

Error: SHELLCHECK_WARNING (CWE-563): [#def158]
/usr/libexec/netconsole:23:1: warning[SC2034]: SERVER_ADDRESS_RESOLUTION appears unused. Verify use (or export if used externally).
#   21|   PATH=/sbin:/usr/sbin:$PATH
#   22|   RETVAL=0
#   23|-> SERVER_ADDRESS_RESOLUTION=
#   24|   
#   25|   # Check that networking is up.

Error: SHELLCHECK_WARNING (CWE-563): [#def159]
/usr/libexec/netconsole:39:1: warning[SC2034]: kernel appears unused. Verify use (or export if used externally).
#   37|   SYSLOGMACADDR=
#   38|   
#   39|-> kernel=$(uname -r | cut -d. -f1-2)
#   40|   
#   41|   usage ()

Error: SHELLCHECK_WARNING (CWE-156): [#def160]
/usr/libexec/netconsole:103:7: warning[SC2046]: Quote this to prevent word splitting.
#  101|   		exit 6
#  102|   	fi
#  103|-> 	eval $(print_address_info $SYSLOGADDR)
#  104|   	
#  105|   	if [ -z "$SYSLOGMACADDR" ]; then

Error: SHELLCHECK_WARNING (CWE-153): [#def161]
/usr/libexec/readonly-root:119:33: warning[SC2053]: Quote the right-hand side of = in [[ ]] to prevent glob matching.
#  117|                   prefix=0
#  118|                   for mount_point in "${MOUNTS[@]}"; do
#  119|->                         [[ $m = $mount_point ]] && continue
#  120|                           if [[ $m =~ ^$mount_point/.* ]] ; then
#  121|                                   prefix=1

Error: SHELLCHECK_WARNING (CWE-477): [#def162]
/usr/libexec/readonly-root:139:33: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  137|   	# must be done even if we have local storage.
#  138|   	ipaddr=
#  139|-> 	if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then
#  140|   		ipaddr=$(ip addr show to 0.0.0.0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }')
#  141|   		for ip in $ipaddr ; do

Error: SHELLCHECK_WARNING (CWE-563): [#def163]
/usr/libexec/readonly-root:141:3: warning[SC2034]: ip appears unused. Verify use (or export if used externally).
#  139|   	if [ "$HOSTNAME" = "localhost" -o "$HOSTNAME" = "localhost.localdomain" ]; then
#  140|   		ipaddr=$(ip addr show to 0.0.0.0/0 scope global | awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }')
#  141|-> 		for ip in $ipaddr ; do
#  142|   			HOSTNAME=
#  143|   			eval $(ipcalc -h $ipaddr 2>/dev/null)

Error: SHELLCHECK_WARNING (CWE-156): [#def164]
/usr/libexec/readonly-root:143:9: warning[SC2046]: Quote this to prevent word splitting.
#  141|   		for ip in $ipaddr ; do
#  142|   			HOSTNAME=
#  143|-> 			eval $(ipcalc -h $ipaddr 2>/dev/null)
#  144|   			[ -n "$HOSTNAME" ] && { hostname ${HOSTNAME} ; break; }
#  145|   		done

Error: GCC_ANALYZER_WARNING (CWE-775): [#def165]
initscripts-10.23/src/genhostid.c: scope_hint: In function ‘main’
initscripts-10.23/src/genhostid.c:45:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/random", 0)’
#   43|     int fd = open ("/dev/random", O_RDONLY);
#   44|   
#   45|->   if (fd == -1 || read (fd, &n, sizeof (n)) != sizeof (n)) {
#   46|       srand48 ((long int) time (NULL) ^ (long int) getpid ());
#   47|       n = lrand48 ();

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-110.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameinitscripts-10.23-1.fc41
store-results-to/tmp/tmpix4x7q6d/initscripts-10.23-1.fc41.tar.xz
time-created2024-04-22 10:52:44
time-finished2024-04-22 10:53:43
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpix4x7q6d/initscripts-10.23-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpix4x7q6d/initscripts-10.23-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9