Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIldar Gafurov <dev@binblob.com>2016-10-19 13:30:26 +0300
committerIldar Gafurov <dev@binblob.com>2016-10-19 13:30:26 +0300
commitcc4d8653865c2642cb0bc8e198ba4021c37318ea (patch)
tree707075e0b3c28131a7e00ac0d8c9313770694856 /Duplicati/Library/Snapshots/lvm-scripts
parent05c0236ed11a5031d25ab949edfdc2e025cc6a96 (diff)
find-volume.sh - code style fix
Diffstat (limited to 'Duplicati/Library/Snapshots/lvm-scripts')
-rw-r--r--Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh b/Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh
index 9003801db..7ae2029ed 100644
--- a/Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh
+++ b/Duplicati/Library/Snapshots/lvm-scripts/find-volume.sh
@@ -20,7 +20,7 @@ NAME=$1
# Get the reported mount point for the current folder
#
VOLUME=`df -P "$NAME" | tail -1 | awk '{ print $1}'`
-if [ "$?" -ne 0 ] || [ "$VOLUME" == "" ]
+if [ "$?" -ne 0 ] || [ -z "$VOLUME" ]
then
[[ "$?" -ne 0 ]] && EXIT_CODE=$? || EXIT_CODE=-1
echo "Error: unable to determine device for $NAME"
@@ -28,7 +28,7 @@ then
fi
MOUNTPOINT=`df -P "$NAME" | tail -1 | awk '{ print $NF}'`
-if [ "$?" -ne 0 ] || [ "MOUNTPOINT" == "" ]
+if [ "$?" -ne 0 ] || [ -z "$MOUNTPOINT" ]
then
[[ "$?" -ne 0 ]] && EXIT_CODE=$? || EXIT_CODE=-1
echo "Error: unable to determine mount point for $NAME"
@@ -55,14 +55,13 @@ get_lvmid $VOLUME
#
# Get the LVM path for the mapped volume (second try)
#
-if [ "$LVMID" == "" ]
+if [ -z "$LVMID" ]
then
- CMD="mount | awk '(\$3 == \"$MOUNTPOINT\") {print \$1}'"
- VOLUME=` eval $CMD`
+ VOLUME=`mount | awk '($3 == "'$MOUNTPOINT'") {print $1}'`
get_lvmid $VOLUME
fi
-if [ "$LVMID" == "" ]
+if [ -z "$LVMID" ]
then
EXIT_CODE=-1
echo "Error: unable to determine volume group (VG) for $NAME"