[Rear-users] SF.net SVN: rear:[697] trunk/usr/share/rear

jhoekx at users.sourceforge.net jhoekx at users.sourceforge.net
Sat Aug 6 18:05:01 CEST 2011


Revision: 697
          http://rear.svn.sourceforge.net/rear/?rev=697&view=rev
Author:   jhoekx
Date:     2011-08-06 16:05:00 +0000 (Sat, 06 Aug 2011)

Log Message:
-----------
Replace NETFS_URL and ISO_URL by BACKUP_URL and OUTPUT_URL.

Modified Paths:
--------------
    trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh
    trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh
    trunk/usr/share/rear/conf/default.conf
    trunk/usr/share/rear/doc/configuration-examples.txt
    trunk/usr/share/rear/lib/bootloader-functions.sh
    trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh
    trunk/usr/share/rear/output/NETFS/default/95_copy_result_files.sh
    trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh
    trunk/usr/share/rear/output/default/10_mount_output_path.sh
    trunk/usr/share/rear/output/default/98_umount_output_dir.sh
    trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh
    trunk/usr/share/rear/prep/OBDR/default/04_set_tape_device.sh
    trunk/usr/share/rear/prep/TAPE/default/04_set_NETFS_requirements.sh
    trunk/usr/share/rear/prep/USB/default/04_set_NETFS_requirements.sh
    trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh
    trunk/usr/share/rear/verify/NETFS/default/09_set_readonly_options.sh
    trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh

Added Paths:
-----------
    trunk/usr/share/rear/prep/default/02_translate_url.sh
    trunk/usr/share/rear/verify/default/02_translate_url.sh

Modified: trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -4,8 +4,8 @@
 
 AddExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
 
-if [[ "$NETFS_MOUNTCMD" ]] ; then
-    NETFS_URL="var://NETFS_MOUNTCMD"
+if [[ "$BACKUP_MOUNTCMD" ]] ; then
+    BACKUP_URL="var://BACKUP_MOUNTCMD"
 fi
 
-mount_url $NETFS_URL $BUILD_DIR/outputfs
+mount_url $BACKUP_URL $BUILD_DIR/outputfs $BACKUP_OPTIONS

Modified: trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,10 +1,10 @@
 # umount NETFS mountpoint
 
-if [[ "$NETFS_UMOUNTCMD" ]] ; then
-    NETFS_URL="var://NETFS_UMOUNTCMD"
+if [[ "$BACKUP_UMOUNTCMD" ]] ; then
+    BACKUP_URL="var://BACKUP_UMOUNTCMD"
 fi
 
-umount_url $NETFS_URL $BUILD_DIR/outputfs
+umount_url $BACKUP_URL $BUILD_DIR/outputfs
 
 rmdir $v $BUILD_DIR/outputfs >&2
 if [[ $? -eq 0 ]] ; then

Modified: trunk/usr/share/rear/conf/default.conf
===================================================================
--- trunk/usr/share/rear/conf/default.conf	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/conf/default.conf	2011-08-06 16:05:00 UTC (rev 697)
@@ -89,6 +89,32 @@
 CHECK_CONFIG_FILES=( '/etc/drbd/' '/etc/drbd.conf' '/etc/lvm/lvm.conf' '/etc/multipath.conf' '/etc/rear/' '/etc/udev/udev.conf' )
 
 ##
+# Output/backup locations
+##
+
+# The URL defines the remote share as <scheme>://<host>/<share> like these examples:
+# nfs://host.domain/path/path/path
+# cifs://server.domain/share
+# usb:///dev/sdb1
+# others might also work, if they can be mounted with mount <host>:/<path>
+# there is special support for tape:///dev/nst0
+# Additional options to the mount command are given using *_OPTIONS
+# Alternatively, you can provide your own mount/unmount commands, in that case
+# Rear will append its mountpoint to the command.
+
+# specify the location of the backup
+BACKUP_URL=
+BACKUP_OPTIONS=
+BACKUP_MOUNTCMD=
+BACKUP_UMOUNTCMD=
+
+# specify the location of the output
+OUTPUT_URL=
+OUTPUT_OPTIONS=
+OUTPUT_MOUNTCMD=
+OUTPUT_UMOUNTCMD=
+
+##
 # OUTPUT=ISO stuff
 ##
 # ISO produces files suitable for booting with isolinux and assumes that the result
@@ -120,10 +146,6 @@
 # This might get a number appended (for splitting data onto multiple CDs).
 ISO_PREFIX="rear-$HOSTNAME"
 
-# Target location of ISO image
-# Uses the same format as NETFS_URL
-ISO_URL=
-
 ##
 # OUTPUT=USB stuff
 ##
@@ -133,7 +155,7 @@
 #
 # NOTE: "USB" means any local block-storage device and includes also eSATA and other external disks
 
-# the device to use, set automatically by BACKUP=NETFS and NETFS_URL=usb:///dev/sdb1
+# the device to use, set automatically by BACKUP=NETFS and BACKUP_URL=usb:///dev/sdb1
 USB_DEVICE=
 
 # resulting files that should be copied onto the USB stick
@@ -366,36 +388,12 @@
 ##
 # NETFS is an internal backup method that saves the backup into a mounted directory.
 # This is usually a network share, but can also be used to create a backup to a local
-# disk (by providing your own NETFS_MOUNTCMD and NETFS_UMOUNTCMD commands that mount the
+# disk (by providing your own BACKUP_MOUNTCMD and BACKUP_UMOUNTCMD commands that mount the
 # local disk. Please note that a backup to a local disk is not a disaster recovery backup.
 #
 # NETFS saves the system to a network file system. Supported are all filesystems that your
 # system can handle, for some exotic filesystems you might have to extend Rear to correctly
 # handle the URL or provide custom mount/umount commands.
-#
-# The URL defines the remote share as <proto>://<host>/<share> like these examples:
-# nfs://host.domain/path/path/path
-# cifs://server.domain/share
-# usb:///dev/sdb1
-# others might also work, if they can be mounted with mount -t <proto> <host>:/<share>
-NETFS_URL=
-# set options for mount, depends on proto
-# NFS example: rsize=8192,wsize=8192
-# CIFS example: user=<username>,pass=<password>,dom=<domain> (see mount.cifs for full info)
-# for CIFS you should also consider to use credentials=/path/to/credentials-file so that
-# the password won't be so visible. In that file you put lines with the options
-# (user=, pass=, ...) to mount -t cifs. Don't forget to include the credentials file
-# in a COPY_AS_IS statement like
-# COPY_AS_IS=( "${COPY_AS_IS[@]}" /path/to/credentials-file)
-# in your configuration
-NETFS_OPTIONS=
-# you can specify the full mount/umount commands including the server path and options, if
-# your network filesystem does not work with the NETFS_URL mechanism. The MOUNTCMD and UMOUNTCMD
-# options override NETFS_URL. The local mountpoint will be appended to the command line you specify !
-# example: NETFS_MOUNTCMD=ncpmount -A <server-ip> -V <volid>
-# example: NETFS_UMOUNTCMD=ncpumount
-NETFS_MOUNTCMD=
-NETFS_UMOUNTCMD=
 
 # prefix directory to create under the network filesystem share
 NETFS_PREFIX="$(uname -n)"

Modified: trunk/usr/share/rear/doc/configuration-examples.txt
===================================================================
--- trunk/usr/share/rear/doc/configuration-examples.txt	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/doc/configuration-examples.txt	2011-08-06 16:05:00 UTC (rev 697)
@@ -36,33 +36,33 @@
 
 === Using ISO as output method
 When using +OUTPUT=ISO+ you should provide the backup target location through
-the +ISO_URL+ variable. Possible +ISO_URL+ settings are:
+the +OUTPUT_URL+ variable. Possible +OUTPUT_URL+ settings are:
 
-ISO_URL=file://::
+OUTPUT_URL=file://::
 Write the ISO image to disk. The default is in _/tmp_.
 
-ISO_URL=fish//::
+OUTPUT_URL=fish//::
 Write the ISO image using +lftp+ and the FISH protocol.
 
-ISO_URL=ftp://::
+OUTPUT_URL=ftp://::
 Write the ISO image using +lftp+ and the FTP protocol.
 
-ISO_URL=ftps://::
+OUTPUT_URL=ftps://::
 Write the ISO image using +lftp+ and the FTPS protocol.
 
-ISO_URL=hftp://::
+OUTPUT_URL=hftp://::
 Write the ISO image using +lftp+ and the HFTP protocol.
 
-ISO_URL=http://::
+OUTPUT_URL=http://::
 Write the ISO image using +lftp+ and the HTTP (PUT) procotol.
 
-ISO_URL=https://::
+OUTPUT_URL=https://::
 Write the ISO image using +lftp+ and the HTTPS (PUT) protocol.
 
-ISO_URL=sftp://::
+OUTPUT_URL=sftp://::
 Write the ISO image using +lftp+ and the secure FTP (SFTP) protocol.
 
-ISO_URL=rsync://::
+OUTPUT_URL=rsync://::
 Write the ISO image using +rsync+ and the RSYNC protocol.
 
 
@@ -99,23 +99,23 @@
 
 === Using NETFS as backup strategy
 When using +BACKUP=NETFS+ you should provide the backup target location through
-the +NETFS_URL+ variable. Possible +NETFS_URL+ settings are:
+the +BACKUP_URL+ variable. Possible +BACKUP_URL+ settings are:
 
-NETFS_URL=file://::
-To backup to local disk, use +NETFS_URL=file:///directory/path/+
+BACKUP_URL=file://::
+To backup to local disk, use +BACKUP_URL=file:///directory/path/+
 
-NETFS_URL=nfs://::
-To backup to NFS disk, use +NETFS_URL=nfs://nfs-server-name/share/path+
+BACKUP_URL=nfs://::
+To backup to NFS disk, use +BACKUP_URL=nfs://nfs-server-name/share/path+
 
-NETFS_URL=tape://::
-To backup to tape device, use +NETFS_URL=tape:///dev/nst0+ or alternatively,
+BACKUP_URL=tape://::
+To backup to tape device, use +BACKUP_URL=tape:///dev/nst0+ or alternatively,
 simply define +TAPE_DEVICE=/dev/nst0+
 
-NETFS_URL=cifs://::
+BACKUP_URL=cifs://::
 To backup to a Samba share (CIFS), use
-+NETFS_URL=cifs://cifs-server-name/share/path+. To provide credentials for
++BACKUP_URL=cifs://cifs-server-name/share/path+. To provide credentials for
 CIFS mounting use a _/etc/rear/.cifs_ credentials file and define
-+NETFS_OPTIONS="cred=/etc/rear/.cifs"+ and pass along:
++BACKUP_OPTIONS="cred=/etc/rear/.cifs"+ and pass along:
 +
 ----
 username=_username_
@@ -123,7 +123,7 @@
 domain=_domain_
 ----
 
-NETFS_URL=usb://::
+BACKUP_URL=usb://::
 To backup to USB storage device, use +NETFS=usb:///dev/disk/by-path/REAR-000+
 or use a real device node or a specific filesystem label. Alternatively, you
 can specify the device using +USB_DEVICE=/dev/disk/by-path/REAR-000+.
@@ -147,7 +147,7 @@
 
 ----
 OUTPUT=ISO
-ISO_URL=http://server/path-to-push/
+OUTPUT_URL=http://server/path-to-push/
 ----
 
 

Modified: trunk/usr/share/rear/lib/bootloader-functions.sh
===================================================================
--- trunk/usr/share/rear/lib/bootloader-functions.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/lib/bootloader-functions.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -172,7 +172,7 @@
 	echo "label rear"
 	syslinux_menu "label ^Recover $(uname -n)"
 	case $BACKUP in
-		(NETFS) MY_URL="${NETFS_URL:+NETFS_URL=$NETFS_URL}" ;;
+		(NETFS) MY_URL="${BACKUP_URL:+BACKUP_URL=$BACKUP_URL}" ;;
 		(RSYNC) MY_URL="${RSYNC_URL:+RSYNC_URL=$RSYNC_URL}" ;;
 	esac
 	syslinux_menu_help "Rear rescue image kernel $KERNEL_VERSION ${IPADDR:+on $IPADDR} $(date -R)" \

Modified: trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh
===================================================================
--- trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,17 +1,17 @@
-# This script copies the ISO image to the target location in ISO_URL
+# This script copies the ISO image to the target location in OUTPUT_URL
 
 # Check if ISO image is available
 [[ -s "$ISO_DIR/$ISO_PREFIX.iso" ]]
 StopIfError "Image $ISO_DIR/$ISO_PREFIX.iso is missing or empty."
 
-# Check if we have a target location ISO_URL
-if [[ -z "$ISO_URL" ]]; then
+# Check if we have a target location OUTPUT_URL
+if [[ -z "$OUTPUT_URL" ]]; then
     continue
 fi
 
-local scheme=$(url_scheme $ISO_URL)
-local server=$(url_host $ISO_URL)
-local path=$(url_path $ISO_URL)
+local scheme=$(url_scheme $OUTPUT_URL)
+local server=$(url_host $OUTPUT_URL)
+local path=$(url_path $OUTPUT_URL)
 
 case "$scheme" in
     (nfs|cifs|usb|tape)
@@ -21,15 +21,15 @@
     (file)
         LogPrint "Transferring ISO image to $path"
         cp -a $v "$ISO_DIR/$ISO_PREFIX.iso" $path >&2
-        StopIfError "Problem transferring ISO image to $ISO_URL"
+        StopIfError "Problem transferring ISO image to $OUTPUT_URL"
         ;;
     (fish|ftp|ftps|hftp|http|https|sftp)
-        LogPrint "Transferring ISO image to $ISO_URL"
-        lftp -c "open $ISO_URL; mkdir $path; mput -O $path $ISO_DIR/$ISO_PREFIX.iso"
-        StopIfError "Problem transferring ISO image to $ISO_URL"
+        LogPrint "Transferring ISO image to $OUTPUT_URL"
+        lftp -c "open $OUTPUT_URL; mkdir $path; mput -O $path $ISO_DIR/$ISO_PREFIX.iso"
+        StopIfError "Problem transferring ISO image to $OUTPUT_URL"
         ;;
     (rsync)
-        LogPrint "Transferring ISO image to $ISO_URL"
+        LogPrint "Transferring ISO image to $OUTPUT_URL"
         rsync -a $v "$ISO_DIR/$ISO_PREFIX.iso" "$server:$path"
         StopIfError "Problem transferring ISO image to $server:$path"
         ;;

Modified: trunk/usr/share/rear/output/NETFS/default/95_copy_result_files.sh
===================================================================
--- trunk/usr/share/rear/output/NETFS/default/95_copy_result_files.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/output/NETFS/default/95_copy_result_files.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -3,7 +3,7 @@
 
 
 # do not do this for tapes
-local scheme=$(url_scheme $ISO_URL)
+local scheme=$(url_scheme $OUTPUT_URL)
 case $scheme in
     (tape|usb|file)
         return 0

Modified: trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -110,7 +110,7 @@
     say $(uname -n | cut -d. -f1)-$time - Recover $(uname -n | cut -d. -f1) $usb_label_workflow ($time)
     text help
 Rear v$VERSION - $usb_label_workflow using kernel $(uname -r) ${IPADDR:+on $IPADDR}
-${BACKUP:+BACKUP=$BACKUP} ${OUTPUT:+OUTPUT=$OUTPUT} ${NETFS_URL:+NETFS_URL=$NETFS_URL}
+${BACKUP:+BACKUP=$BACKUP} ${OUTPUT:+OUTPUT=$OUTPUT} ${BACKUP_URL:+BACKUP_URL=$BACKUP_URL}
     endtext
     kernel /$USB_PREFIX/kernel
     append initrd=/$USB_PREFIX/initrd.cgz root=/dev/ram0 vga=normal rw $KERNEL_CMDLINE

Modified: trunk/usr/share/rear/output/default/10_mount_output_path.sh
===================================================================
--- trunk/usr/share/rear/output/default/10_mount_output_path.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/output/default/10_mount_output_path.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -4,12 +4,12 @@
 
 AddExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
 
-if [[ "$ISO_MOUNTCMD" ]] ; then
-    ISO_URL="var://ISO_MOUNTCMD"
+if [[ "$OUTPUT_MOUNTCMD" ]] ; then
+    OUTPUT_URL="var://OUTPUT_MOUNTCMD"
 fi
 
-if [[ -z "$ISO_URL" ]] ; then
+if [[ -z "$OUTPUT_URL" ]] ; then
     return
 fi
 
-mount_url $ISO_URL $BUILD_DIR/outputfs
+mount_url $OUTPUT_URL $BUILD_DIR/outputfs $OUTPUT_OPTIONS

Modified: trunk/usr/share/rear/output/default/98_umount_output_dir.sh
===================================================================
--- trunk/usr/share/rear/output/default/98_umount_output_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/output/default/98_umount_output_dir.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,14 +1,14 @@
 # umount ISO mountpoint
 
-if [[ "$ISO_UMOUNTCMD" ]] ; then
-    ISO_URL="var://NETFS_UMOUNTCMD"
+if [[ "$OUTPUT_UMOUNTCMD" ]] ; then
+    OUTPUT_URL="var://OUTPUT_UMOUNTCMD"
 fi
 
-if [[ -z "$ISO_URL" ]] ; then
+if [[ -z "$OUTPUT_URL" ]] ; then
     return
 fi
 
-umount_url $ISO_URL $BUILD_DIR/outputfs
+umount_url $OUTPUT_URL $BUILD_DIR/outputfs
 
 rmdir $v $BUILD_DIR/outputfs >&2
 if [[ $? -eq 0 ]] ; then

Modified: trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh
===================================================================
--- trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,14 +1,14 @@
-# NETFS_URL=[proto]://[host]/[share]
+# BACKUP_URL=[proto]://[host]/[share]
 # example: nfs://lucky/temp/backup
 # example: cifs://lucky/temp
 # example: usb:///dev/sdb1
 # example: tape:///dev/nst0
 
-[[ "$NETFS_URL" || "$NETFS_MOUNTCMD" ]]
-StopIfError "You must specify either NETFS_URL or NETFS_MOUNTCMD and NETFS_UMOUNTCMD !"
+[[ "$BACKUP_URL" || "$BACKUP_MOUNTCMD" ]]
+StopIfError "You must specify either BACKUP_URL or BACKUP_MOUNTCMD and BACKUP_UMOUNTCMD !"
 
-if [[ "$NETFS_URL" ]] ; then
-    local host=$(url_host $NETFS_URL)
+if [[ "$BACKUP_URL" ]] ; then
+    local host=$(url_host $BACKUP_URL)
 
     if [[ -z "$host" ]] ; then
         host="localhost" # otherwise, ping could fail
@@ -22,20 +22,14 @@
             Log "Skipping ping test"
     fi
 
-    ### set other variables from NETFS_URL
-    case $(url_scheme $NETFS_URL) in
+    ### set other variables from BACKUP_URL
+    case $(url_scheme $BACKUP_URL) in
         (usb)
             if [[ -z "$USB_DEVICE" ]] ; then
-                USB_DEVICE="/$(url_path $NETFS_URL)"
+                USB_DEVICE="/$(url_path $BACKUP_URL)"
             fi
             ;;
     esac
-
-    if [[ -z "$ISO_URL" ]] ; then
-        if [[ -z "$ISO_MOUNTCMD" ]] ; then
-            ISO_URL=$NETFS_URL
-        fi
-    fi
 fi
 
 # some backup progs require a different backuparchive name
@@ -50,7 +44,7 @@
 esac
 
 # set archive names
-case "$TAPE_DEVICE:$(url_scheme $NETFS_URL)" in
+case "$TAPE_DEVICE:$(url_scheme $BACKUP_URL)" in
 	(:*)
 		backuparchive="${BUILD_DIR}/outputfs/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}"
 		;;
@@ -59,10 +53,10 @@
 		;;
 esac
 
-if test "$NETFS_MOUNTCMD" -a "$NETFS_UMOUNTCMD" ; then
+if test "$BACKUP_MOUNTCMD" -a "$BACKUP_UMOUNTCMD" ; then
 	displayarchive="$backuparchive"
 else
-	displayarchive="$NETFS_URL/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}"
+	displayarchive="$BACKUP_URL/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}"
 fi
 
 
@@ -76,11 +70,11 @@
 rpcbind
 rpcinfo
 mount
-mount.$(url_scheme $NETFS_URL)
-umount.$(url_scheme $NETFS_URL)
+mount.$(url_scheme $BACKUP_URL)
+umount.$(url_scheme $BACKUP_URL)
 $(
-test "$NETFS_MOUNTCMD" && echo "${NETFS_MOUNTCMD%% *}"
-test "$NETFS_UMOUNTCMD" && echo "${NETFS_UMOUNTCMD%% *}"
+test "$BACKUP_MOUNTCMD" && echo "${BACKUP_MOUNTCMD%% *}"
+test "$BACKUP_UMOUNTCMD" && echo "${BACKUP_UMOUNTCMD%% *}"
 )
 $BACKUP_PROG
 gzip
@@ -88,4 +82,4 @@
 )
 
 # include required modules, like nfs cifs ...
-MODULES=( "${MODULES[@]}" $(url_scheme $NETFS_URL) )
+MODULES=( "${MODULES[@]}" $(url_scheme $BACKUP_URL) )

Modified: trunk/usr/share/rear/prep/OBDR/default/04_set_tape_device.sh
===================================================================
--- trunk/usr/share/rear/prep/OBDR/default/04_set_tape_device.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/prep/OBDR/default/04_set_tape_device.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,18 +1,18 @@
-### Extract the tape device from NETFS_URL
+### Extract the tape device from BACKUP_URL
 ###
 
 ### Either variable can be used, but if both are, they must be the same value
 
 TAPE_DEVICE=${TAPE_DEVICE//\/st/\/nst}
 
-if [[ "$NETFS_URL" ]]; then
-    scheme="${NETFS_URL%%://*}"
+if [[ "$BACKUP_URL" ]]; then
+    scheme="${BACKUP_URL%%://*}"
     case "$scheme" in
         (tape)
-            tempdevice="${NETFS_URL##*://}"
+            tempdevice="${BACKUP_URL##*://}"
             ### Complain when both are specified, but don't match
             if [[ "$TAPE_DEVICE" && "$TAPE_DEVICE" != "$tempdevice" ]]; then
-                Error "Tape device in NETFS_URL '$NETFS_URL' and TAPE_DEVICE '$TAPE_DEVICE' is not the same"
+                Error "Tape device in BACKUP_URL '$BACKUP_URL' and TAPE_DEVICE '$TAPE_DEVICE' is not the same"
             fi
             TAPE_DEVICE="$tempdevice"
             ;;

Modified: trunk/usr/share/rear/prep/TAPE/default/04_set_NETFS_requirements.sh
===================================================================
--- trunk/usr/share/rear/prep/TAPE/default/04_set_NETFS_requirements.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/prep/TAPE/default/04_set_NETFS_requirements.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -2,9 +2,9 @@
 
 TAPE_DEVICE=${TAPE_DEVICE//\/st/\/nst}
 
-if [[ -z "$NETFS_URL" ]]; then
+if [[ -z "$BACKUP_URL" ]]; then
     [[ "$TAPE_DEVICE" ]]
-    StopIfError "You must specify either NETFS_URL or TAPE_DEVICE !"
+    StopIfError "You must specify either BACKUP_URL or TAPE_DEVICE !"
 
-    NETFS_URL="tape://$TAPE_DEVICE"
+    BACKUP_URL="tape://$TAPE_DEVICE"
 fi

Modified: trunk/usr/share/rear/prep/USB/default/04_set_NETFS_requirements.sh
===================================================================
--- trunk/usr/share/rear/prep/USB/default/04_set_NETFS_requirements.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/prep/USB/default/04_set_NETFS_requirements.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,10 +1,10 @@
 # Provide the necessary variables to make NETFS use USB information
 
-if [[ -z "$NETFS_URL" ]]; then
+if [[ -z "$BACKUP_URL" ]]; then
     [[ "$USB_DEVICE" ]]
-    StopIfError "You must specify either NETFS_URL or USB_DEVICE !"
+    StopIfError "You must specify either BACKUP_URL or USB_DEVICE !"
 
-    NETFS_URL="usb://$USB_DEVICE"
+    BACKUP_URL="usb://$USB_DEVICE"
 fi
 
 USB_PREFIX="rear/$(uname -n)/$(date +%Y%m%d.%H%M)"

Added: trunk/usr/share/rear/prep/default/02_translate_url.sh
===================================================================
--- trunk/usr/share/rear/prep/default/02_translate_url.sh	                        (rev 0)
+++ trunk/usr/share/rear/prep/default/02_translate_url.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -0,0 +1,63 @@
+### Backwards compatibility with NETFS_URL and ISO_URL
+
+if [[ "$NETFS_URL" ]] ; then
+    Log "Using NETFS_URL is deprecated. Use BACKUP_URL instead."
+    BACKUP_URL=$NETFS_URL
+fi
+
+if [[ "$NETFS_MOUNTCMD" ]] ; then
+    BACKUP_MOUNTCMD=$NETFS_MOUNTCMD
+fi
+
+if [[ "$NETFS_UMOUNTCMD" ]] ; then
+    BACKUP_UMOUNTCMD=$NETFS_UMOUNTCMD
+fi
+
+if [[ "$NETFS_OPTIONS" ]] ; then
+    BACKUP_OPTIONS=$NETFS_OPTIONS
+fi
+
+if [[ "$ISO_URL" ]] ; then
+    Log "Using ISO_URL is deprecated. Use OUTPUT_URL instead."
+    OUTPUT_URL=$ISO_URL
+fi
+
+if [[ "$ISO_MOUNTCMD" ]] ; then
+    OUTPUT_MOUNTCMD=$ISO_MOUNTCMD
+fi
+
+if [[ "$ISO_UMOUNTCMD" ]] ; then
+    OUTPUT_UMOUNTCMD=$ISO_UMOUNTCMD
+fi
+
+if [[ "$ISO_OPTIONS" ]] ; then
+    OUTPUT_OPTIONS=$ISO_OPTIONS
+fi
+
+### Make sure we have OUTPUT_* from BACKUP_*, for compat with versions that
+### not separated the two.
+
+if [[ -z "$OUTPUT_OPTIONS" ]] ; then
+    if [[ -z "$OUTPUT_URL" && -z "$OUTPUT_MOUNTCMD" ]] ; then
+        ### There can be cases where it's intentionally empty.
+        OUTPUT_OPTIONS=$BACKUP_OPTIONS
+    fi
+fi
+
+if [[ -z "$OUTPUT_URL" ]] ; then
+    if [[ -z "$OUTPUT_MOUNTCMD" ]] ; then
+        OUTPUT_URL=$BACKUP_URL
+    fi
+fi
+
+if [[ -z "$OUTPUT_MOUNTCMD" ]] ; then
+    if [[ -z "$OUTPUT_URL" ]] ; then
+        OUTPUT_MOUNTCMD=$BACKUP_MOUNTCMD
+    fi
+fi
+
+if [[ -z "$OUTPUT_UMOUNTCMD" ]] ; then
+    if [[ -z "$OUTPUT_URL" && -z "$OUTPUT_MOUNTCMD" ]] ; then
+        OUTPUT_UMOUNTCMD=$BACKUP_UMOUNTCMD
+    fi
+fi

Modified: trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh
===================================================================
--- trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,7 +1,7 @@
 #
 # start required daemons, like portmap
 #
-local scheme=$(url_scheme "$NETFS_URL")
+local scheme=$(url_scheme "$BACKUP_URL")
 case "$scheme" in
 	nfs)
 		# newer Linux distros use rpcbind instead of portmap

Modified: trunk/usr/share/rear/verify/NETFS/default/09_set_readonly_options.sh
===================================================================
--- trunk/usr/share/rear/verify/NETFS/default/09_set_readonly_options.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/verify/NETFS/default/09_set_readonly_options.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,5 +1,5 @@
 # on restore it is better to mount the remote filesystem ro
 
-# if it is empty then the result is ro, else the result is ro,$NETFS_OPTIONS
-NETFS_OPTIONS="ro${NETFS_OPTIONS:+,}$NETFS_OPTIONS"
+# if it is empty then the result is ro, else the result is ro,$BACKUP_OPTIONS
+BACKUP_OPTIONS="ro${BACKUP_OPTIONS:+,}$BACKUP_OPTIONS"
 

Modified: trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh
===================================================================
--- trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh	2011-08-06 16:01:35 UTC (rev 696)
+++ trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -1,7 +1,7 @@
 # check wether the archive is actually there
 
 # Don't check when backup is on a tape device
-case $(url_scheme "$NETFS_URL") in
+case $(url_scheme "$BACKUP_URL") in
     (tape)
         return 0
         ;;

Added: trunk/usr/share/rear/verify/default/02_translate_url.sh
===================================================================
--- trunk/usr/share/rear/verify/default/02_translate_url.sh	                        (rev 0)
+++ trunk/usr/share/rear/verify/default/02_translate_url.sh	2011-08-06 16:05:00 UTC (rev 697)
@@ -0,0 +1 @@
+link ../../prep/default/02_translate_url.sh
\ No newline at end of file


Property changes on: trunk/usr/share/rear/verify/default/02_translate_url.sh
___________________________________________________________________
Added: svn:special
   + *


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list