"Fossies" - the Fresh Open Source Software Archive

Member "rear-2.7/usr/share/rear/prep/OBDR/BACULA/default/030_bextract_tape_device.sh" (14 Jul 2022, 604 Bytes) of package /linux/privat/rear-2.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "030_bextract_tape_device.sh": 2.6_vs_2.7.

    1 # In case we have bacula, we could use the device from the bacula configuration
    2 
    3 # We construct the TAPE_DEVICE based on the Bacula device name in the bacula
    4 # configuration
    5 
    6 if [[ "$BACKUP" != "BACULA" ]]; then
    7     return
    8 fi
    9 
   10 if [[ -z "$TAPE_DEVICE" && "$BEXTRACT_DEVICE" ]]; then
   11     has_binary btape
   12     LogIfError "btape binary not found, unable to handle BEXTRACT_DEVICE '$BEXTRACT_DEVICE'"
   13 
   14     TAPE_DEVICE="$(echo cap | btape $BEXTRACT_DEVICE | awk '/^Device name/ { print $3 }')"
   15 
   16     [[ "$TAPE_DEVICE" ]] || Error "Either tape device $BEXTRACT_DEVICE is missing, or it has no tape inserted."
   17 fi