Bug 2224820

Summary: nut-2.8.0-10 : egrep warnings from /usr/libexec/nut-driver-enumerator.sh
Product: [Fedora] Fedora Reporter: Frantisek Hanzlik <franta>
Component: nutAssignee: Michal Hlavinka <mhlavink>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: cra, james, mhlavink, orion, scott
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frantisek Hanzlik 2023-07-23 06:30:26 UTC
script /usr/libexec/nut-driver-enumerator.sh contain several deprecated 'egrep' calls (and GNU grep 3.8 emit warnings about it):

# grep -n 'egrep' /usr/libexec/nut-driver-enumerator.sh
95:if set | egrep '^(shell|version|t?csh)' | egrep 't?csh' >/dev/null ; then
435:    # Note: Primary aim of this egrep is to pick either assignments or flags
445:        LINE="`echo "$SECTION_CONTENT" | egrep '(^'"$1"'=|^'"$1"'$)'`" \
628:    /usr/bin/svcs -a -H -o fmri | egrep '/nut-driver:'
759:    /bin/systemctl show 'nut-driver@*' -p Id | egrep '=nut-driver' | sed 's,^Id=,,'
827:    egrep -v '(^$|^#)' | \
834:    | egrep -v '^$' \
835:    | egrep '([\[\=]|^[^ '"$TABCHAR"']*$|^[^ '"$TABCHAR"']*[ '"$TABCHAR"']*\#.*$)'
862:        && UPSCONF_DATA_SDP="`egrep '^(\[.*\]|driver=|port=)' << EOF
893:        UPSLIST_FILE="$(echo "$UPSCONF_DATA_SDP" | egrep '^\[[^'"$TABCHAR"'\ ]*\]$' | sed 's,^\[\(.*\)\]$,\1,' | sort -n)" \
1301:                    echo "$UPSLIST_FILE" | egrep "^$SVC\$"


Reproducible: Always