"Fossies" - the Fresh Open Source Software Archive

Member "rear-2.5/usr/share/rear/prep/OBDR/BACULA/default/030_bextract_tape_device.sh" (10 May 2019, 611 Bytes) of package /linux/privat/rear-2.5.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. Alternatively you can here view or download the uninterpreted source code file.

    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" ]]
   17     StopIfError "Either tape device $BEXTRACT_DEVICE is missing, or it has no tape inserted."
   18 fi