mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 18:20:07 +01:00
dispatcher: fix shellcheck warnings
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. And likewise, prefer [ p ] || [ q ] over [ p -o q ]. https://github.com/koalaman/shellcheck/wiki/SC2166
This commit is contained in:
parent
27ab932a49
commit
9e43821e17
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ handle_ip_file() {
|
|||
}
|
||||
|
||||
|
||||
if [ "$2" != "pre-up" -a "$2" != "down" ]; then
|
||||
if [ "$2" != "pre-up" ] && [ "$2" != "down" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ if [ -z "$profile" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if ! [ -f "$dir/rule-$profile" -o -f "$dir/rule6-$profile" ]; then
|
||||
if [ ! -f "$dir/rule-$profile" ] && [ ! -f "$dir/rule6-$profile" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue