forked from evolix/evocheck
IS_BACKPORTSCONF: Quiet grep and better readability
Added `-s` to grep to not have error messages like: `grep: /etc/apt/preferences.d/*: No such file or directory` And don't use `2>/dev/null` as there is `-s` grep option! Added if condition for better readability of the code.
This commit is contained in:
parent
a9d26a49b4
commit
1aad813663
|
@ -607,8 +607,12 @@ if [ -e /etc/debian_version ]; then
|
|||
|
||||
if [ "$IS_BACKPORTSCONF" = 1 ]; then
|
||||
if is_debianversion stretch; then
|
||||
grep -qE "^[^#].*backports" /etc/apt/sources.list && echo 'IS_BACKPORTSCONF FAILED!'
|
||||
grep -qE "^[^#].*backports" /etc/apt/sources.list.d/*.list 2>/dev/null && (grep -qE "^[^#].*backports" /etc/apt/preferences.d/* || echo 'IS_BACKPORTSCONF FAILED!')
|
||||
grep -qsE "^[^#].*backports" /etc/apt/sources.list \
|
||||
&& echo 'IS_BACKPORTSCONF FAILED!'
|
||||
if grep -qsE "^[^#].*backports" /etc/apt/sources.list.d/*.list; then
|
||||
grep -qsE "^[^#].*backports" /etc/apt/preferences.d/* \
|
||||
|| echo 'IS_BACKPORTSCONF FAILED!'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue