master - lvmconf_lockingtype2: preferable syntax
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ef8691a2d22e6a7afabdcdde93676b562a5fcfa1 Commit: ef8691a2d22e6a7afabdcdde93676b562a5fcfa1 Parent: 030912ec03f4ad1874351dbfb2048fa73477d914 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Jun 28 21:09:52 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jun 29 22:23:16 2017 +0200
lvmconf_lockingtype2: preferable syntax
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
--- scripts/lvmconf_lockingtype2.sh | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
scripts/lvmconf_lockingtype2.sh +5 -5
@@ -110,8 +110,10 @@ function validate_args fi - if [ "$LOCKING_TYPE" = "1" ] && [ -n "$LOCKINGLIBDIR" -o -n "$LOCKINGLIB" ]; then - echo "Superfluous locking lib parameter, ignoring" + if [ "$LOCKING_TYPE" = "1" ] ; then + if [ -n "$LOCKINGLIBDIR" ] || [ -n "$LOCKINGLIB" ]; then + echo "Superfluous locking lib parameter, ignoring" + fi fi }
@@ -143,9 +145,7 @@ grep -q '^[[:blank:]]*locking_library[[:blank:]]*=' $CONFIGFILE have_library=$? # Those options are in section "global {" so we must have one if any are present. -if [ "$have_type" = "0" -o "$have_dir" = "0" -o "$have_library" = "0" ] -then - +if [ "$have_type" = "0" ] || [ "$have_dir" = "0" ] || [ "$have_library" = "0" ]; then # See if we can find it... grep -q '^[[:blank:]]*global[[:blank:]]*{' $CONFIGFILE have_global=$?