1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

Add default values to vars

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets 2016-11-27 06:23:42 +03:00
parent 03c116c3f1
commit bf4e31ae71
2 changed files with 11 additions and 5 deletions

View File

@ -43,6 +43,12 @@ case "$UUID" in
;; ;;
esac esac
WORK_DIR="${WORK_DIR:-/run/bees/}"
MNT_DIR="${MNT_DIR:-$WORK_DIR/mnt/$UUID}"
BEESHOME="${BEESHOME:-$MNT_DIR/.beeshome}"
BEESSTATUS="${BEESSTATUS:-$WORK_DIR/$UUID.status}"
DB_SIZE="${DB_SIZE:-$((64*AL16M))}"
INFO "Check: BTRFS UUID exists" INFO "Check: BTRFS UUID exists"
if [ ! -d "/sys/fs/btrfs/$UUID" ]; then if [ ! -d "/sys/fs/btrfs/$UUID" ]; then
ERRO "Can't find BTRFS UUID: $UUID" ERRO "Can't find BTRFS UUID: $UUID"

View File

@ -7,10 +7,10 @@ UUID=5d3c0ad5-bedf-463d-8235-b4d4f6f99476
## System Vars ## System Vars
# Change carefully # Change carefully
WORK_DIR=/run/bees/ # WORK_DIR=/run/bees/
MNT_DIR="$WORK_DIR/mnt/$UUID" # MNT_DIR="$WORK_DIR/mnt/$UUID"
BEESHOME="$MNT_DIR/.beeshome" # BEESHOME="$MNT_DIR/.beeshome"
BEESSTATUS="$WORK_DIR/$UUID.status" # BEESSTATUS="$WORK_DIR/$UUID.status"
## Bees DB size ## Bees DB size
# Hash Table Sizing # Hash Table Sizing
@ -25,4 +25,4 @@ BEESSTATUS="$WORK_DIR/$UUID.status"
# 64TB 1GB 1024K # 64TB 1GB 1024K
# #
# Size MUST be power of 16M # Size MUST be power of 16M
DB_SIZE=$((64*$AL16M)) # 1G in bytes # DB_SIZE=$((64*$AL16M)) # 1G in bytes