# HG changeset patch # User Franz Glasner # Date 1725884935 -7200 # Node ID 62cd970aea9cd3b0592b100d5b52b4617f007512 # Parent b0148ccbc459e57af90d5a622a3bc0ebf600d60d Replace the use of "deprecated" egrep calls with "grep -E" diff -r b0148ccbc459 -r 62cd970aea9c sbin/bsmtp2dma --- a/sbin/bsmtp2dma Mon Sep 09 14:13:51 2024 +0200 +++ b/sbin/bsmtp2dma Mon Sep 09 14:28:55 2024 +0200 @@ -93,12 +93,12 @@ _addr="$1" test -n "${_addr}" || return 1 - if printf "%s" "${_addr}" | grep -q -E -e '^[^<>]+<[^<>]+@[^<>]+>$'; then + if printf "%s" "${_addr}" | /usr/bin/grep -q -E -e '^[^<>]+<[^<>]+@[^<>]+>$'; then email_name=$(printf '%s' "${_addr}" | sed -E -e 's/[[:space:]]*<.+$//') email_addr=$(printf '%s' "${_addr}" | sed -E -e 's/^[^<>]+$//') return 0 fi - if printf "%s" "${_addr}" | grep -q -E -e '^[^<>]+@[^<>]+$'; then + if printf "%s" "${_addr}" | /usr/bin/grep -q -E -e '^[^<>]+@[^<>]+$'; then email_name="" email_addr="${_addr}" return 0 diff -r b0148ccbc459 -r 62cd970aea9c sbin/ftjail --- a/sbin/ftjail Mon Sep 09 14:13:51 2024 +0200 +++ b/sbin/ftjail Mon Sep 09 14:28:55 2024 +0200 @@ -538,7 +538,7 @@ { echo "ERROR: dataset not found" >&2; return 1; } /sbin/mount -t zfs -p \ - | grep -E "^${_dsname}(/|\s)" \ + | /usr/bin/grep -E "^${_dsname}(/|\s)" \ | sort -n -r \ | { while IFS=' '$'\t' read -r _name _mp _rest ; do @@ -940,12 +940,12 @@ # Note that procstat places extra whitespace at the end of lines sometimes. # # - if procstat -a file | egrep '['$'\t '']+'"${_directory}"'(/|(['$'\t '']*)$)' ; then + if procstat -a file | /usr/bin/grep -E '['$'\t '']+'"${_directory}"'(/|(['$'\t '']*)$)' ; then echo "ERROR: There are open files within the jail" >&2 return 1 fi # The same for memory mappings - if procstat -a vm | egrep '['$'\t '']+'"${_directory}"'(/|(['$'\t '']*)$)' ; then + if procstat -a vm | /usr/bin/grep -E '['$'\t '']+'"${_directory}"'(/|(['$'\t '']*)$)' ; then echo "ERROR: There are open memory mappings within the jail" >&2 return 1 fi diff -r b0148ccbc459 -r 62cd970aea9c sbin/fzfs --- a/sbin/fzfs Mon Sep 09 14:13:51 2024 +0200 +++ b/sbin/fzfs Mon Sep 09 14:28:55 2024 +0200 @@ -322,7 +322,7 @@ done else /sbin/mount -t zfs -p \ - | LC_ALL=C /usr/bin/egrep "^${_dsname}(/|\s)" \ + | LC_ALL=C /usr/bin/grep -E "^${_dsname}(/|\s)" \ | LC_ALL=C /usr/bin/sort -n -r \ | while IFS=' '$'\t' read -r _name _mp _rest ; do if checkyes _opt_dry_run ; then diff -r b0148ccbc459 -r 62cd970aea9c share/local-bsdtools/common.subr --- a/share/local-bsdtools/common.subr Mon Sep 09 14:13:51 2024 +0200 +++ b/share/local-bsdtools/common.subr Mon Sep 09 14:28:55 2024 +0200 @@ -442,10 +442,10 @@ _strict="${2-}" if checkyes _strict; then # Oracle docs - printf "%s" "$1" | LC_ALL=C /usr/bin/egrep -q '^[A-Za-z][-A-Za-z0-9_.]*(/[A-Za-z0-9][-A-Za-z0-9:_.]*)*(@[A-Za-z0-9][-A-Za-z0-9:_.]*)?$' + printf "%s" "$1" | LC_ALL=C /usr/bin/grep -q -E '^[A-Za-z][-A-Za-z0-9_.]*(/[A-Za-z0-9][-A-Za-z0-9:_.]*)*(@[A-Za-z0-9][-A-Za-z0-9:_.]*)?$' else # OpenZFS - printf "%s" "$1" | LC_ALL=C /usr/bin/egrep -q '^[A-Za-z][-A-Za-z0-9:_. ]*(/[-A-Za-z0-9:_. ]+)*(@[-A-Za-z0-9:_. ]+)?$' + printf "%s" "$1" | LC_ALL=C /usr/bin/grep -q -E '^[A-Za-z][-A-Za-z0-9:_. ]*(/[-A-Za-z0-9:_. ]+)*(@[-A-Za-z0-9:_. ]+)?$' fi }