Bug 2224820 - nut-2.8.0-10 : egrep warnings from /usr/libexec/nut-driver-enumerator.sh
Summary: nut-2.8.0-10 : egrep warnings from /usr/libexec/nut-driver-enumerator.sh
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-23 06:30 UTC by Frantisek Hanzlik
Modified: 2023-07-23 06:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.