]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: hydractl: sync-backups/sync-media: minor improvements
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Dec 2024 20:17:16 +0000 (17:17 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Dec 2024 20:17:16 +0000 (17:17 -0300)
share/hydractl/sync-backups
share/hydractl/sync-media

index 9cc79def95f26695f55ff08329c73d97ba9faf26..63e11b4ebdb51ea2d444af25ffe4c1ff18f3ff9f 100755 (executable)
@@ -84,13 +84,13 @@ fi
 
 # Check volume name
 if [ "$VOLUME" == "`hostname -f`" ]; then
-  echo "volume is the hostname, cannot sync to myself"
+  echo "$BASENAME: volume is the hostname, cannot sync to myself"
   exit 1
 fi
 
 # Check if it is mounted
 if ! mount | grep -q $MEDIA; then
-  echo "volume $MEDIA is not mounted"
+  echo "$BASENAME: volume $MEDIA is not mounted"
   exit 1
 fi
 
index 8132315ef0e88cb8f8bb9291718e95845d34a23f..17ee219945e744d3e17f13838ecc8eed29f9a3c4 100755 (executable)
@@ -171,12 +171,16 @@ if echo $OPTIONS | grep -q -- "--dropunused"; then
 fi
 
 # Set drive config
-# Ingore drive/volume if it's set to "local"
+# Ignore drive/volume if it's set to "local"
 if [ ! -z "$REMOTE" ] && [ "$REMOTE" != "local" ] && [ "$REMOTE" != "localhost" ]; then
   # Check storage media
   MOUNT="`mount | grep $VOLUME`"
+
   if [ ! -z "$MOUNT" ]; then
     DRIVE="$(basename `echo $MOUNT | awk '{ print $1 }'`)"
+  #else
+  #  echo "$BASENAME: volume $MEDIA is not mounted"
+  #  exit 1
   fi
 fi