mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Fix shellcheck v0.4.6 warnings
Resolve new warnings reported after upgrading to shellcheck version 0.4.6. This patch contains no functional changes. * egrep is non-standard and deprecated. Use grep -E instead. [SC2196] * Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. [SC2181] Suppressed. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7040
This commit is contained in:
+3
-3
@@ -70,12 +70,12 @@ function or_die
|
||||
|
||||
# core file helpers
|
||||
origcorepattern="$(cat /proc/sys/kernel/core_pattern)"
|
||||
coreglob="$(egrep -o '^([^|%[:space:]]*)' /proc/sys/kernel/core_pattern)*"
|
||||
coreglob="$(grep -E -o '^([^|%[:space:]]*)' /proc/sys/kernel/core_pattern)*"
|
||||
|
||||
if [[ $coreglob = "*" ]]; then
|
||||
echo "Setting core file pattern..."
|
||||
echo "core" > /proc/sys/kernel/core_pattern
|
||||
coreglob="$(egrep -o '^([^|%[:space:]]*)' \
|
||||
coreglob="$(grep -E -o '^([^|%[:space:]]*)' \
|
||||
/proc/sys/kernel/core_pattern)*"
|
||||
fi
|
||||
|
||||
@@ -243,7 +243,7 @@ while [[ $timeout -eq 0 ]] || [[ $curtime -le $((starttime + timeout)) ]]; do
|
||||
echo "$desc" >>ztest.out
|
||||
$cmd >>ztest.out 2>&1
|
||||
ztrc=$?
|
||||
egrep '===|WARNING' ztest.out >>ztest.history
|
||||
grep -E '===|WARNING' ztest.out >>ztest.history
|
||||
$ZDB -U "$workdir/zpool.cache" -DD ztest >>ztest.ddt 2>&1
|
||||
|
||||
store_core
|
||||
|
||||
Reference in New Issue
Block a user