diff options
author | Andrew Cady <d@jerkface.net> | 2023-05-28 19:36:23 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-05-28 19:36:23 -0400 |
commit | ad80d194fd63fc327eb161236ee1750b76838d03 (patch) | |
tree | 99d6637356326509d197b387a5dd85c46d8542ca | |
parent | 2b2a068fa369a6eb2d326a2983ff9a2b90676b9c (diff) |
btrfs-scan: use default destination from file /etc/btrfs/destination.txt
-rwxr-xr-x | src/btrfs-scan | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/btrfs-scan b/src/btrfs-scan index ab9f771..85b1e63 100755 --- a/src/btrfs-scan +++ b/src/btrfs-scan | |||
@@ -142,7 +142,8 @@ do | |||
142 | shift | 142 | shift |
143 | done | 143 | done |
144 | 144 | ||
145 | [ "$DESTINATION" ] | 145 | destination_file=/etc/btrfs/destination.txt |
146 | [ "$DESTINATION" ] || read DESTINATION <"$destination_file" | ||
146 | 147 | ||
147 | destination_host=${DESTINATION%%:*} | 148 | destination_host=${DESTINATION%%:*} |
148 | destination_basename=$(hostname) && [ "$destination_basename" ] || destination_basename=btrfs | 149 | destination_basename=$(hostname) && [ "$destination_basename" ] || destination_basename=btrfs |