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

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


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

Log Message:
-----------
Unify mounting/unmounting in output and backup stages.

Changes:
 - replace usbfs/ and netfs/ by outputfs/
 - fix double mount of usb drive when NETFS is used
 - add generic mount/unmount scripts

Modified Paths:
--------------
    trunk/usr/share/rear/backup/NETFS/GNU/Linux/60_start_selinux.sh
    trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh
    trunk/usr/share/rear/backup/NETFS/default/15_save_copy_of_prefix_dir.sh
    trunk/usr/share/rear/backup/NETFS/default/20_make_prefix_dir.sh
    trunk/usr/share/rear/backup/NETFS/default/25_create_lock.sh
    trunk/usr/share/rear/backup/NETFS/default/50_make_backup.sh
    trunk/usr/share/rear/backup/NETFS/default/97_remove_lock.sh
    trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh
    trunk/usr/share/rear/backup/RSYNC/GNU/Linux/62_force_autorelabel.sh
    trunk/usr/share/rear/lib/global-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/USB/Linux-i386/83_copy_kernel_initrd.sh
    trunk/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh
    trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh
    trunk/usr/share/rear/restore/NETFS/default/40_restore_backup.sh
    trunk/usr/share/rear/restore/NETFS/default/50_selinux_autorelabel.sh
    trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh
    trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh
    trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh

Added Paths:
-----------
    trunk/usr/share/rear/output/default/10_mount_output_path.sh
    trunk/usr/share/rear/output/default/98_umount_output_dir.sh

Removed Paths:
-------------
    trunk/usr/share/rear/output/NETFS/default/10_mount_NETFS_path.sh
    trunk/usr/share/rear/output/NETFS/default/98_umount_NETFS_dir.sh
    trunk/usr/share/rear/output/USB/Linux-i386/10_mount_USB.sh
    trunk/usr/share/rear/output/USB/Linux-i386/98_umount_USB.sh

Modified: trunk/usr/share/rear/backup/NETFS/GNU/Linux/60_start_selinux.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/GNU/Linux/60_start_selinux.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/GNU/Linux/60_start_selinux.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -2,6 +2,6 @@
 [ -f $TMP_DIR/selinux.mode ] && {
 	cat $TMP_DIR/selinux.mode > /selinux/enforce
 	Log "Restored original SELinux mode"
-	touch "${BUILD_DIR}/netfs/${NETFS_PREFIX}/selinux.autorelabel"
+	touch "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/selinux.autorelabel"
 	Log "Trigger autorelabel (SELinux) file"
 	}

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/10_mount_NETFS_path.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,36 +1,11 @@
 # create mount point
-mkdir -p $v "$BUILD_DIR/netfs" >&2
-StopIfError "Could not mkdir '$BUILD_DIR/netfs'"
+mkdir -p $v "$BUILD_DIR/outputfs" >&2
+StopIfError "Could not mkdir '$BUILD_DIR/outputfs'"
 
-AddExitTask "rmdir $v $BUILD_DIR/netfs >&2"
+AddExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
 
-# don't mount anything for tape backups
-if [ "$NETFS_PROTO" == "tape" ]; then
-	return 0
+if [[ "$NETFS_MOUNTCMD" ]] ; then
+    NETFS_URL="var://NETFS_MOUNTCMD"
 fi
 
-# mount the network filesystem
-
-# default option is rw,noatime but it is just a dummy filler
-if test -z "$NETFS_OPTIONS" ; then
-	NETFS_OPTIONS="rw,noatime"
-fi
-# if a mount command is given, use that instead
-if test "$NETFS_MOUNTCMD" ; then
-	Log "Mounting with '$NETFS_MOUNTCMD $BUILD_DIR/netfs'"
-	$NETFS_MOUNTCMD "$BUILD_DIR/netfs" >&2
-	StopIfError "Your NETFS mount command '$NETFS_MOUNTCMD' failed."
-else
-	case "$NETFS_PROTO" in
-	usb ) 	Log "Running 'mount -o $NETFS_OPTIONS $NETFS_MOUNTPATH $BUILD_DIR/netfs'"
-		mount $v -o "$NETFS_OPTIONS" "$NETFS_MOUNTPATH" "$BUILD_DIR/netfs" >&2
-		StopIfError "Mounting '$NETFS_SHARE' [$NETFS_PROTO] failed."
-		;;
-	* )
-		Log "Running 'mount -t $NETFS_PROTO -o $NETFS_OPTIONS $NETFS_MOUNTPATH $BUILD_DIR/netfs'"
-		mount $v -t $NETFS_PROTO -o "$NETFS_OPTIONS" "$NETFS_MOUNTPATH" "$BUILD_DIR/netfs" >&2
-		StopIfError "Mounting '$NETFS_HOST:/$NETFS_SHARE' [$NETFS_PROTO] failed."
-		;;
-	esac
-fi
-AddExitTask "umount -f $v '$BUILD_DIR/netfs' >&2"
+mount_url $NETFS_URL $BUILD_DIR/outputfs

Modified: trunk/usr/share/rear/backup/NETFS/default/15_save_copy_of_prefix_dir.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/15_save_copy_of_prefix_dir.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/15_save_copy_of_prefix_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,15 +1,15 @@
 # if NETFS_KEEP_OLD_BACKUP_COPY is not empty then move old NETFS_PREFIX directory to NETFS_PREFIX.old
 if ! test -z "${NETFS_KEEP_OLD_BACKUP_COPY}"; then
-	if ! test -f "${BUILD_DIR}/netfs/${NETFS_PREFIX}/.lockfile" ; then
+	if ! test -f "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/.lockfile" ; then
 		# lockfile made through workflow backup already (so output keep hands off)
-		if test -d "${BUILD_DIR}/netfs/${NETFS_PREFIX}" ; then
-			rm -rf $v "${BUILD_DIR}/netfs/${NETFS_PREFIX}.old" >&2
-			StopIfError "Could not remove '${BUILD_DIR}/netfs/${NETFS_PREFIX}.old'"
-			mv -f $v "${BUILD_DIR}/netfs/${NETFS_PREFIX}" "${BUILD_DIR}/netfs/${NETFS_PREFIX}.old" >&2
-			StopIfError "Could not move '${BUILD_DIR}/netfs/${NETFS_PREFIX}'"
+		if test -d "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" ; then
+			rm -rf $v "${BUILD_DIR}/outputfs/${NETFS_PREFIX}.old" >&2
+			StopIfError "Could not remove '${BUILD_DIR}/outputfs/${NETFS_PREFIX}.old'"
+			mv -f $v "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" "${BUILD_DIR}/outputfs/${NETFS_PREFIX}.old" >&2
+			StopIfError "Could not move '${BUILD_DIR}/outputfs/${NETFS_PREFIX}'"
 		fi
 	else
-		Log "Lockfile '${BUILD_DIR}/netfs/${NETFS_PREFIX}/.lockfile' found. Not keeping old backup data."
+		Log "Lockfile '${BUILD_DIR}/outputfs/${NETFS_PREFIX}/.lockfile' found. Not keeping old backup data."
 	fi
 fi
-# the ${BUILD_DIR}/netfs/${NETFS_PREFIX} will be created by output/NETFS/default/20_make_prefix_dir.sh
+# the ${BUILD_DIR}/outputfs/${NETFS_PREFIX} will be created by output/NETFS/default/20_make_prefix_dir.sh

Modified: trunk/usr/share/rear/backup/NETFS/default/20_make_prefix_dir.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/20_make_prefix_dir.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/20_make_prefix_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -2,5 +2,5 @@
 # if set, create $NETFS_PREFIX under the mounted network filesystem share. This defaults
 # to uname -n
 
-mkdir -p $v -m0750 "${BUILD_DIR}/netfs/${NETFS_PREFIX}" >&2
-StopIfError "Could not mkdir '${BUILD_DIR}/netfs/${NETFS_PREFIX}'"
+mkdir -p $v -m0750 "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" >&2
+StopIfError "Could not mkdir '${BUILD_DIR}/outputfs/${NETFS_PREFIX}'"

Modified: trunk/usr/share/rear/backup/NETFS/default/25_create_lock.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/25_create_lock.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/25_create_lock.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,7 +1,7 @@
 # create a lockfile in $NETFS_PREFIX to avoid that mkrescue overwrites ISO/LOGFILE
 # made by a previous mkbackup run when the variable NETFS_KEEP_OLD_BACKUP_COPY has been set
 
-if test -d "${BUILD_DIR}/netfs/${NETFS_PREFIX}" ; then
-	> "${BUILD_DIR}/netfs/${NETFS_PREFIX}/.lockfile"
-	StopIfError "Could not create '${BUILD_DIR}/netfs/${NETFS_PREFIX}/.lockfile'"
+if test -d "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" ; then
+	> "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/.lockfile"
+	StopIfError "Could not create '${BUILD_DIR}/outputfs/${NETFS_PREFIX}/.lockfile'"
 fi

Modified: trunk/usr/share/rear/backup/NETFS/default/50_make_backup.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/50_make_backup.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/50_make_backup.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -10,7 +10,7 @@
 	Log " $REPLY"
 done < $TMP_DIR/backup-exclude.txt
 
-mkdir -p $v "${BUILD_DIR}/netfs/${NETFS_PREFIX}" >&2
+mkdir -p $v "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" >&2
 
 LogPrint "Creating $BACKUP_PROG archive '$backuparchive'"
 ProgressStart "Preparing archive operation"
@@ -126,4 +126,4 @@
 fi
 
 ### Copy progress log to backup media
-cp $v "${TMP_DIR}/${BACKUP_PROG_ARCHIVE}.log" "${BUILD_DIR}/netfs/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}.log" >&2
+cp $v "${TMP_DIR}/${BACKUP_PROG_ARCHIVE}.log" "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}.log" >&2

Modified: trunk/usr/share/rear/backup/NETFS/default/97_remove_lock.sh
===================================================================
--- trunk/usr/share/rear/backup/NETFS/default/97_remove_lock.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/97_remove_lock.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,2 +1,2 @@
 # remove the lockfile
-rm -f $v "${BUILD_DIR}/netfs/${NETFS_PREFIX}/.lockfile" >&2
+rm -f $v "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/.lockfile" >&2

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/NETFS/default/98_umount_NETFS_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,21 +1,13 @@
 # umount NETFS mountpoint
 
-# don't mount anything for tape backups
-if [ "$NETFS_PROTO" == "tape" ]; then
-	return
+if [[ "$NETFS_UMOUNTCMD" ]] ; then
+    NETFS_URL="var://NETFS_UMOUNTCMD"
 fi
 
-if test "$NETFS_UMOUNTCMD" ; then
-	Log "Running '$NETFS_UMOUNTCMD ${BUILD_DIR}/netfs'"
-	$NETFS_UMOUNTCMD "${BUILD_DIR}/netfs"
-else
-	Log "Running 'umount -f ${BUILD_DIR}/netfs'"
-	umount -f $v "${BUILD_DIR}/netfs" >&2
-fi
-StopIfError "Could not unmount directory ${BUILD_DIR}/netfs"
+umount_url $NETFS_URL $BUILD_DIR/outputfs
 
-rmdir $v $BUILD_DIR/netfs >&2
-
-# the argument to RemoveExitTask has to be identical to the one given to AddExitTask
-RemoveExitTask "umount -f $v '$BUILD_DIR/netfs' >&2"
-RemoveExitTask "rmdir $v $BUILD_DIR/netfs >&2"
\ No newline at end of file
+rmdir $v $BUILD_DIR/outputfs >&2
+if [[ $? -eq 0 ]] ; then
+    # the argument to RemoveExitTask has to be identical to the one given to AddExitTask
+    RemoveExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
+fi

Modified: trunk/usr/share/rear/backup/RSYNC/GNU/Linux/62_force_autorelabel.sh
===================================================================
--- trunk/usr/share/rear/backup/RSYNC/GNU/Linux/62_force_autorelabel.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/backup/RSYNC/GNU/Linux/62_force_autorelabel.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -28,10 +28,10 @@
 
 	(*)
 		# probably using the BACKUP=NETFS workflow instead
-		if [ -d "${BUILD_DIR}/netfs/${NETFS_PREFIX}" ]; then
-			if [ ! -f "${BUILD_DIR}/netfs/${NETFS_PREFIX}/selinux.autorelabel" ]; then
-				> "${BUILD_DIR}/netfs/${NETFS_PREFIX}/selinux.autorelabel"
-				StopIfError "Failed to create selinux.autorelabel on ${BUILD_DIR}/netfs/${NETFS_PREFIX}"
+		if [ -d "${BUILD_DIR}/outputfs/${NETFS_PREFIX}" ]; then
+			if [ ! -f "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/selinux.autorelabel" ]; then
+				> "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/selinux.autorelabel"
+				StopIfError "Failed to create selinux.autorelabel on ${BUILD_DIR}/outputfs/${NETFS_PREFIX}"
 			fi
 		fi
 		;;

Modified: trunk/usr/share/rear/lib/global-functions.sh
===================================================================
--- trunk/usr/share/rear/lib/global-functions.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/lib/global-functions.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -25,3 +25,115 @@
 	fi
 }
 
+######
+### Functions for dealing with URLs
+######
+
+url_scheme() {
+    local url=$1
+    echo ${url%%://*}
+}
+
+url_host() {
+    local url=$1
+    local temp=${url#*//}
+    echo ${temp%%/*}
+}
+
+url_path() {
+    local url=$1
+    local temp=${url#*//}
+    echo ${temp#*/}
+}
+
+### Mount URL $1 at mountpoint $2[, with options $3]
+mount_url() {
+    local url=$1
+    local mountpoint=$2
+    local options=${3:-"rw,noatime"}
+
+    ### Generate a mount command
+    local mount_cmd
+    case $(url_scheme $url) in
+        (tape|file|rsync)
+            ### Don't need to mount anything for these
+            return 0
+            ;;
+        (var)
+            ### The mount command is given by variable in the url host
+            local var=$(url_host $url)
+            mount_cmd="${!var} $mountpoint"
+            ;;
+        (cifs)
+            mount_cmd="mount $v -o $options //$(url_host $url)/$(url_path $url) $mountpoint"
+            ;;
+        (usb)
+            mount_cmd="mount $v -o $options /$(url_path $url) $mountpoint"
+            ;;
+        (*)
+            mount_cmd="mount $v -t $(url_scheme $url) -o $options $(url_host $url):/$(url_path $url) $mountpoint"
+            ;;
+    esac
+
+    Log "Mounting with '$mount_cmd'"
+    $mount_cmd >&2
+    StopIfError "Mount command '$mount_cmd' failed."
+
+    AddExitTask "umount -f $v '$mountpoint' >&2"
+    return 0
+}
+
+### Unmount url $1 at mountpoint $2
+umount_url() {
+    local url=$1
+    local mountpoint=$2
+
+    case $(url_scheme $url) in
+        (tape|file|rsync)
+            ### Don't need to umount anything for these
+            return 0
+            ;;
+        (var)
+            local var=$(url_host $url)
+            umount_cmd="${!var} $mountpoint"
+
+            Log "Unmounting with '$umount_cmd'"
+            $umount_cmd
+            StopIfError "Unmounting failed."
+
+            RemoveExitTask "umount -f $v '$mountpoint' >&2"
+            return 0
+            ;;
+    esac
+
+    umount_mountpoint $mountpoint
+    StopIfError "Unmounting '$mountpoint' failed."
+
+    RemoveExitTask "umount -f $v '$mountpoint' >&2"
+    return 0
+}
+
+### Unmount mountpoint $1
+umount_mountpoint() {
+    local mountpoint=$1
+
+    ### First, try a normal unmount,
+    Log "Unmounting '$mountpoint'"
+    umount $v $mountpoint >&2
+    if [[ $? -eq 0 ]] ; then
+        return 0
+    fi
+
+    ### otherwise, try to kill all processes that opened files on the mount.
+    # TODO: actually implement this
+
+    ### If that still fails, force unmount.
+    Log "Forced unmount of '$mountpoint'"
+    umount $v -f $mountpoint >&2
+    if [[ $? -eq 0 ]] ; then
+        return 0
+    fi
+
+    Log "Unmounting '$mountpoint' failed."
+    return 1
+}
\ No newline at end of file

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -9,12 +9,15 @@
     continue
 fi
 
-local scheme="${ISO_URL%%://*}"
-local server="${ISO_URL#*://}"
-server="${server%%/*}"
-local path="/${ISO_URL#*://*/}"
+local scheme=$(url_scheme $ISO_URL)
+local server=$(url_host $ISO_URL)
+local path=$(url_path $ISO_URL)
 
 case "$scheme" in
+    (nfs|cifs|usb|tape)
+        # The ISO has already been transferred by NETFS.
+        return 0
+        ;;
     (file)
         LogPrint "Transferring ISO image to $path"
         cp -a $v "$ISO_DIR/$ISO_PREFIX.iso" $path >&2

Deleted: trunk/usr/share/rear/output/NETFS/default/10_mount_NETFS_path.sh
===================================================================
--- trunk/usr/share/rear/output/NETFS/default/10_mount_NETFS_path.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/NETFS/default/10_mount_NETFS_path.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1 +0,0 @@
-link ../../../backup/NETFS/default/10_mount_NETFS_path.sh
\ No newline at end of file

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/NETFS/default/95_copy_result_files.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,27 +1,31 @@
 #
 # copy resulting files to network backup location
 
+
 # do not do this for tapes
-if [ "$NETFS_PROTO" == "tape" -o "$NETFS_PROTO" == "usb" ]; then
-	return 0
-fi
+local scheme=$(url_scheme $ISO_URL)
+case $scheme in
+    (tape|usb|file)
+        return 0
+        ;;
+esac
 
-LogPrint "Copying resulting files to $NETFS_PROTO location"
+LogPrint "Copying resulting files to $scheme location"
 
 # if called as mkbackuponly then we just don't have any result files.
 if test "$RESULT_FILES" ; then
-	Log "Copying files '${RESULT_FILES[@]}' to $NETFS_PROTO location"
-	cp $v "${RESULT_FILES[@]}" "${BUILD_DIR}/netfs/${NETFS_PREFIX}/" >&2
-	StopIfError "Could not copy files to $NETFS_PROTO location"
+	Log "Copying files '${RESULT_FILES[@]}' to $scheme location"
+	cp $v "${RESULT_FILES[@]}" "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/" >&2
+	StopIfError "Could not copy files to $scheme location"
 fi
 
-echo "$VERSION_INFO" >"${BUILD_DIR}/netfs/${NETFS_PREFIX}/VERSION"
-StopIfError "Could not create VERSION file on $NETFS_PROTO location"
+echo "$VERSION_INFO" >"${BUILD_DIR}/outputfs/${NETFS_PREFIX}/VERSION"
+StopIfError "Could not create VERSION file on $scheme location"
 
-cp $v $CONFIG_DIR/templates/RESULT_usage_$OUTPUT.txt "${BUILD_DIR}/netfs/${NETFS_PREFIX}/README" >&2
-StopIfError "Could not copy usage file to $NETFS_PROTO location"
+cp $v $CONFIG_DIR/templates/RESULT_usage_$OUTPUT.txt "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/README" >&2
+StopIfError "Could not copy usage file to $scheme location"
 
-cat "$LOGFILE" >"${BUILD_DIR}/netfs/${NETFS_PREFIX}/rear.log"
-StopIfError "Could not copy $LOGFILE to $NETFS_PROTO location"
+cat "$LOGFILE" >"${BUILD_DIR}/outputfs/${NETFS_PREFIX}/rear.log"
+StopIfError "Could not copy $LOGFILE to $scheme location"
 
 Log "Saved $LOGFILE as ${NETFS_PREFIX}/rear.log"

Deleted: trunk/usr/share/rear/output/NETFS/default/98_umount_NETFS_dir.sh
===================================================================
--- trunk/usr/share/rear/output/NETFS/default/98_umount_NETFS_dir.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/NETFS/default/98_umount_NETFS_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1 +0,0 @@
-link ../../../backup/NETFS/default/98_umount_NETFS_dir.sh
\ No newline at end of file

Deleted: trunk/usr/share/rear/output/USB/Linux-i386/10_mount_USB.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/10_mount_USB.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/USB/Linux-i386/10_mount_USB.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,21 +0,0 @@
-# create mount point
-if [[ ! -d "$BUILD_DIR/usbfs" ]]; then
-	mkdir -p $v "$BUILD_DIR/usbfs" >&2
-	StopIfError "Could not mkdir '$BUILD_DIR/usbfs'"
-	AddExitTask "rmdir $v $BUILD_DIR/usbfs >&2"
-fi
-
-# if a mount command is given, use that instead
-if test "$USB_MOUNTCMD" ; then
-	Log "Mounting with '$USB_MOUNTCMD $BUILD_DIR/usbfs'"
-	$USB_MOUNTCMD "$BUILD_DIR/usbfs" >&2
-	StopIfError "Your USB mount command '$USB_MOUNTCMD' failed."
-else
-	[[ "$USB_DEVICE" ]]
-	StopIfError "USB device (\$USB_DEVICE) is not set."
-	Log "Running 'mount $USB_DEVICE $BUILD_DIR/usbfs'"
-	mount $v -o noatime "$USB_DEVICE" "$BUILD_DIR/usbfs" >&2
-	StopIfError "Mounting '$USB_DEVICE' '$BUILD_DIR/usbfs' failed."
-fi
-
-AddExitTask "umount -f $v '$BUILD_DIR/usbfs' >&2"

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,7 +1,7 @@
 # Create a suitable syslinux configuration based on capabilities
 
 function get_usb_syslinux_version {
-    for file in $BUILD_DIR/usbfs/{boot/syslinux,}/{ld,ext}linux.sys; do
+    for file in $BUILD_DIR/outputfs/{boot/syslinux,}/{ld,ext}linux.sys; do
         if [[ -s "$file" ]];  then
             strings $file | grep -P -m1 "^(EXT|SYS)LINUX \\d+.\\d+" | cut -d' ' -f2
             return 0
@@ -30,13 +30,13 @@
 function syslinux_has {
     local file="$1"
 
-    if [[ -e "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/$file" ]]; then
+    if [[ -e "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/$file" ]]; then
         if [[ "$SYSLINUX_NEEDS_UPDATE" ]]; then
             if [[ -e "$SYSLINUX_DIR/$file" ]]; then
-                cp -f $v "$SYSLINUX_DIR/$file" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/$file" >&2
+                cp -f $v "$SYSLINUX_DIR/$file" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/$file" >&2
             else
                 # Make sure we don't have any older copies on USB media
-                rm -f $v "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/$file" >&2
+                rm -f $v "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/$file" >&2
                 return 1;
             fi
         else
@@ -44,7 +44,7 @@
         fi
     else
         if [[ -e "$SYSLINUX_DIR/$file" ]]; then
-            cp $v "$SYSLINUX_DIR/$file" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/$file" >&2
+            cp $v "$SYSLINUX_DIR/$file" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/$file" >&2
         else
             return 1
         fi
@@ -95,7 +95,7 @@
     (*) BugError "Workflow $WORKFLOW should not run this script."
 esac
 
-USB_REAR_DIR="$BUILD_DIR/usbfs/$USB_PREFIX"
+USB_REAR_DIR="$BUILD_DIR/outputfs/$USB_PREFIX"
 if [ ! -d "$USB_REAR_DIR" ]; then
     mkdir -p $v "$USB_REAR_DIR" >&8
     StopIfError "Could not create USB rear dir [$USB_REAR_DIR] !"
@@ -121,7 +121,7 @@
 # entries for backup and rescue
 backup_count=${USB_RETAIN_BACKUP_NR:-2}
 rescue_count=${USB_RETAIN_BACKUP_NR:-2}
-for rear_run in $(ls -dt $BUILD_DIR/usbfs/rear/$(uname -n)/*); do
+for rear_run in $(ls -dt $BUILD_DIR/outputfs/rear/$(uname -n)/*); do
     backup_name=$rear_run/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}
     if [[ -e $backup_name ]] ; then
         backup_count=$((backup_count - 1))
@@ -151,7 +151,7 @@
 
     oldsystem=
     # TODO: Sort systems by name, but also sort timestamps in reverse order
-    for file in $(cd $BUILD_DIR/usbfs; find rear/*/* -name syslinux.cfg); do
+    for file in $(cd $BUILD_DIR/outputfs; find rear/*/* -name syslinux.cfg); do
         dir=$(dirname $file)
         time=$(basename $dir)
         system=$(basename $(dirname $dir))
@@ -187,7 +187,7 @@
         if [[ "$FEATURE_SYSLINUX_INCLUDE" ]]; then
             syslinux_write "    include /$file"
         else
-            cat $BUILD_DIR/usbfs/$file >&4
+            cat $BUILD_DIR/outputfs/$file >&4
         fi
         oldsystem=$system
     done
@@ -211,14 +211,14 @@
 EOF
     fi
 
-} 4>"$BUILD_DIR/usbfs/rear/syslinux.cfg"
+} 4>"$BUILD_DIR/outputfs/rear/syslinux.cfg"
 
-if [ ! -d "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX" ]; then
-    mkdir -p $v "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX" >&8
-    StopIfError "Could not create USB syslinux dir [$BUILD_DIR/usbfs/$SYSLINUX_PREFIX] !"
+if [ ! -d "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX" ]; then
+    mkdir -p $v "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX" >&8
+    StopIfError "Could not create USB syslinux dir [$BUILD_DIR/outputfs/$SYSLINUX_PREFIX] !"
 fi
 
-echo "$VERSION_INFO" >$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/message
+echo "$VERSION_INFO" >$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/message
 
 # We generate a main extlinux.conf in /boot/syslinux that consist of all
 # default functionality
@@ -251,7 +251,7 @@
     syslinux_has "vesamenu.c32"
 
     if [ -r "$CONFIG_DIR/templates/rear.help" ]; then
-        cp $v "$CONFIG_DIR/templates/rear.help" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/rear.help" >&8
+        cp $v "$CONFIG_DIR/templates/rear.help" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/rear.help" >&8
         syslinux_write <<EOF
 say F1 - Show help
 F1 /boot/syslinux/rear.help
@@ -280,7 +280,7 @@
 include /rear/syslinux.cfg
 EOF
 else
-    cat "$BUILD_DIR/usbfs/rear/syslinux.cfg" >&4
+    cat "$BUILD_DIR/outputfs/rear/syslinux.cfg" >&4
 fi
 
 syslinux_write <<EOF
@@ -347,12 +347,12 @@
 
     if syslinux_has "hdt.c32"; then
         if [ -r "/usr/share/hwdata/pci.ids" ]; then
-            cp $v "/usr/share/hwdata/pci.ids" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/pci.ids" >&8
+            cp $v "/usr/share/hwdata/pci.ids" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/pci.ids" >&8
         elif [ -r "/usr/share/pci.ids" ]; then
-            cp $v "/usr/share/pci.ids" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/pci.ids" >&8
+            cp $v "/usr/share/pci.ids" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/pci.ids" >&8
         fi
         if [ -r "/lib/modules/$(uname -r)/modules.pcimap" ]; then
-            cp $v "/lib/modules/$KERNEL_VERSION/modules.pcimap" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/modules.pcimap" >&8
+            cp $v "/lib/modules/$KERNEL_VERSION/modules.pcimap" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/modules.pcimap" >&8
         fi
         syslinux_write <<EOF
 label hdt
@@ -369,7 +369,7 @@
     # You need the memtest86+ package installed for this to work
     MEMTEST_BIN=$(ls -d /boot/memtest86+-* 2>&8 | tail -1)
     if [[ "$MEMTEST_BIN" != "." && -r "$MEMTEST_BIN" ]]; then
-        cp $v "$MEMTEST_BIN" "$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/memtest" >&8
+        cp $v "$MEMTEST_BIN" "$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/memtest" >&8
         syslinux_write <<EOF
 label memtest
     say memtest - Run memtest86+
@@ -411,6 +411,6 @@
 EOF
     fi
 
-} 4>"$BUILD_DIR/usbfs/$SYSLINUX_PREFIX/extlinux.conf"
+} 4>"$BUILD_DIR/outputfs/$SYSLINUX_PREFIX/extlinux.conf"
 
 Log "Created extlinux configuration '$SYSLINUX_PREFIX/extlinux.conf'"

Modified: trunk/usr/share/rear/output/USB/Linux-i386/83_copy_kernel_initrd.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/83_copy_kernel_initrd.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/USB/Linux-i386/83_copy_kernel_initrd.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,16 +1,16 @@
 # copy kernel and initrd to USB dir for Relax & Recover
 #
 
-cp -pL $v "$KERNEL_FILE" "$BUILD_DIR/usbfs/$USB_PREFIX/kernel" >&2
-StopIfError "Could not create $BUILD_DIR/usbfs/$USB_PREFIX/kernel"
+cp -pL $v "$KERNEL_FILE" "$BUILD_DIR/outputfs/$USB_PREFIX/kernel" >&2
+StopIfError "Could not create $BUILD_DIR/outputfs/$USB_PREFIX/kernel"
 
-cp -p $v "$TMP_DIR/initrd.cgz" "$BUILD_DIR/usbfs/$USB_PREFIX/initrd.cgz" >&2
-StopIfError "Could not create $BUILD_DIR/usbfs/$USB_PREFIX/initrd.cgz"
+cp -p $v "$TMP_DIR/initrd.cgz" "$BUILD_DIR/outputfs/$USB_PREFIX/initrd.cgz" >&2
+StopIfError "Could not create $BUILD_DIR/outputfs/$USB_PREFIX/initrd.cgz"
 
 Log "Copied kernel and initrd.cgz to $USB_PREFIX"
 
-cat "$LOGFILE" >"$BUILD_DIR/usbfs/$USB_PREFIX/rear.log"
-StopIfError "Could not copy $LOGFILE to $BUILD_DIR/usbfs/$USB_PREFIX/rear.log"
+cat "$LOGFILE" >"$BUILD_DIR/outputfs/$USB_PREFIX/rear.log"
+StopIfError "Could not copy $LOGFILE to $BUILD_DIR/outputfs/$USB_PREFIX/rear.log"
 Log "Saved $LOGFILE as $USB_PREFIX/rear.log"
 
 # FIXME: This is meaningless ATM, RESULT_FILES should be put somewhere reliable and not on a temporary mounted media.

Modified: trunk/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -26,11 +26,11 @@
 case "$usb_filesystem" in
 	(ext?)
 		if [[ "$FEATURE_SYSLINUX_EXTLINUX_INSTALL" ]]; then
-			extlinux -i "${BUILD_DIR}/usbfs/$SYSLINUX_PREFIX"
+			extlinux -i "${BUILD_DIR}/outputfs/$SYSLINUX_PREFIX"
 		else
-			extlinux "${BUILD_DIR}/usbfs/$SYSLINUX_PREFIX"
+			extlinux "${BUILD_DIR}/outputfs/$SYSLINUX_PREFIX"
 		fi
-		StopIfError "Problem with extlinux -i ${BUILD_DIR}/usbfs/$SYSLINUX_PREFIX"
+		StopIfError "Problem with extlinux -i ${BUILD_DIR}/outputfs/$SYSLINUX_PREFIX"
 		;;
 	(ntfs|vfat)
 		Error "Filesystem '$usb_filesystem' will not be supported."

Deleted: trunk/usr/share/rear/output/USB/Linux-i386/98_umount_USB.sh
===================================================================
--- trunk/usr/share/rear/output/USB/Linux-i386/98_umount_USB.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/output/USB/Linux-i386/98_umount_USB.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,16 +0,0 @@
-# umount USB mountpoint if not yet done by NETFS method
-
-if test "$USB_UMOUNTCMD" ; then
-	Log "Running '$USB_UMOUNTCMD ${BUILD_DIR}/usbfs'"
-	$USB_UMOUNTCMD "${BUILD_DIR}/usbfs" >&2
-else
-	Log "Running 'umount -f ${BUILD_DIR}/usbfs'"
-	umount -f $v "${BUILD_DIR}/usbfs" >&2
-fi
-StopIfError "Could not unmount directory ${BUILD_DIR}/usbfs"
-
-rmdir $v $BUILD_DIR/usbfs >&2
-
-# argument to RemoveExitTask must be identical to AddExitTask
-RemoveExitTask "umount -f $v '$BUILD_DIR/usbfs' >&2"
-RemoveExitTask "rmdir $v $BUILD_DIR/usbfs >&2"
\ No newline at end of file

Added: trunk/usr/share/rear/output/default/10_mount_output_path.sh
===================================================================
--- trunk/usr/share/rear/output/default/10_mount_output_path.sh	                        (rev 0)
+++ trunk/usr/share/rear/output/default/10_mount_output_path.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -0,0 +1,15 @@
+# create mount point
+mkdir -p $v "$BUILD_DIR/outputfs" >&2
+StopIfError "Could not mkdir '$BUILD_DIR/outputfs'"
+
+AddExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
+
+if [[ "$ISO_MOUNTCMD" ]] ; then
+    ISO_URL="var://ISO_MOUNTCMD"
+fi
+
+if [[ -z "$ISO_URL" ]] ; then
+    return
+fi
+
+mount_url $ISO_URL $BUILD_DIR/outputfs

Added: trunk/usr/share/rear/output/default/98_umount_output_dir.sh
===================================================================
--- trunk/usr/share/rear/output/default/98_umount_output_dir.sh	                        (rev 0)
+++ trunk/usr/share/rear/output/default/98_umount_output_dir.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -0,0 +1,17 @@
+# umount ISO mountpoint
+
+if [[ "$ISO_UMOUNTCMD" ]] ; then
+    ISO_URL="var://NETFS_UMOUNTCMD"
+fi
+
+if [[ -z "$ISO_URL" ]] ; then
+    return
+fi
+
+umount_url $ISO_URL $BUILD_DIR/outputfs
+
+rmdir $v $BUILD_DIR/outputfs >&2
+if [[ $? -eq 0 ]] ; then
+    # the argument to RemoveExitTask has to be identical to the one given to AddExitTask
+    RemoveExitTask "rmdir $v $BUILD_DIR/outputfs >&2"
+fi
\ No newline at end of file

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/prep/NETFS/default/05_check_NETFS_requirements.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -4,47 +4,38 @@
 # example: usb:///dev/sdb1
 # example: tape:///dev/nst0
 
-NETFS_PROTO=
-NETFS_HOST=
-NETFS_SHARE=
-NETFS_MOUNTPATH=
+[[ "$NETFS_URL" || "$NETFS_MOUNTCMD" ]]
+StopIfError "You must specify either NETFS_URL or NETFS_MOUNTCMD and NETFS_UMOUNTCMD !"
 
-# check for complete information, we need either NETFS_URL or NETFS_MOUNTCMD/UMOUNTCMD
-if test -z "$NETFS_URL" ; then
-	if ! test "$NETFS_MOUNTCMD" -a "$NETFS_UMOUNTCMD" ; then
-		Error "You must specify either NETFS_URL or NETFS_MOUNTCMD and NETFS_UMOUNTCMD !"
-	fi
-else
-	# we have an URL, break it into parts
-	NETFS_PROTO="${NETFS_URL%%://*}"
-	tmp="${NETFS_URL##*://}"
-	NETFS_HOST="${tmp%%/*}"
-	NETFS_SHARE="${tmp#*/}"
+if [[ "$NETFS_URL" ]] ; then
+    local host=$(url_host $NETFS_URL)
 
-	# NETFS_MOUNTPATH is the string that the mount command expects to get to access the
-	# remote share. Default is host:/share format
-	NETFS_MOUNTPATH="$NETFS_HOST:/$NETFS_SHARE"
+    if [[ -z "$host" ]] ; then
+        host="localhost" # otherwise, ping could fail
+    fi
 
-	# special treatments for some protocols
-	case "$NETFS_PROTO" in
-		cifs)
-			NETFS_MOUNTPATH="//$NETFS_HOST/$NETFS_SHARE" ;;
-		usb )
-			NETFS_MOUNTPATH="/$NETFS_SHARE"
-			NETFS_HOST=localhost	# otherwise, ping could fail
-			USB_DEVICE="/$NETFS_SHARE"
-			;;
-		*) ;;
-	esac
+    ### check if host is reachable
+    if [[ "$PING" ]]; then
+            ping -c 2 "$host" >&8
+            StopIfError "Backup host [$host] not reachable."
+    else
+            Log "Skipping ping test"
+    fi
 
-	# check if host is reachable
-	if test "$PING" ; then
-		ping -c 2 "$NETFS_HOST" >&8
-		StopIfError "Backup host [$NETFS_HOST] not reachable."
-	else
-		Log "Skipping ping test"
-	fi
+    ### set other variables from NETFS_URL
+    case $(url_scheme $NETFS_URL) in
+        (usb)
+            if [[ -z "$USB_DEVICE" ]] ; then
+                USB_DEVICE="/$(url_path $NETFS_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
@@ -59,9 +50,9 @@
 esac
 
 # set archive names
-case "$TAPE_DEVICE:$NETFS_PROTO" in
+case "$TAPE_DEVICE:$(url_scheme $NETFS_URL)" in
 	(:*)
-		backuparchive="${BUILD_DIR}/netfs/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}"
+		backuparchive="${BUILD_DIR}/outputfs/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}"
 		;;
 	(*:tape)
 		backuparchive="${TAPE_DEVICE}"
@@ -85,8 +76,8 @@
 rpcbind
 rpcinfo
 mount
-mount.$NETFS_PROTO
-umount.$NETFS_PROTO
+mount.$(url_scheme $NETFS_URL)
+umount.$(url_scheme $NETFS_URL)
 $(
 test "$NETFS_MOUNTCMD" && echo "${NETFS_MOUNTCMD%% *}"
 test "$NETFS_UMOUNTCMD" && echo "${NETFS_UMOUNTCMD%% *}"
@@ -97,4 +88,4 @@
 )
 
 # include required modules, like nfs cifs ...
-MODULES=( "${MODULES[@]}" $NETFS_PROTO )
+MODULES=( "${MODULES[@]}" $(url_scheme $NETFS_URL) )

Modified: trunk/usr/share/rear/restore/NETFS/default/40_restore_backup.sh
===================================================================
--- trunk/usr/share/rear/restore/NETFS/default/40_restore_backup.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/restore/NETFS/default/40_restore_backup.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,7 +1,7 @@
 # 40_restore_backup.sh
 #
 
-mkdir -p "${BUILD_DIR}/netfs/${NETFS_PREFIX}"
+mkdir -p "${BUILD_DIR}/outputfs/${NETFS_PREFIX}"
 
 Log "Restoring $BACKUP_PROG archive '$backuparchive'"
 Print "Restoring from '$displayarchive'"

Modified: trunk/usr/share/rear/restore/NETFS/default/50_selinux_autorelabel.sh
===================================================================
--- trunk/usr/share/rear/restore/NETFS/default/50_selinux_autorelabel.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/restore/NETFS/default/50_selinux_autorelabel.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,5 +1,5 @@
 # If selinux was turned off for the backup we have to label the
-[ -f "${BUILD_DIR}/netfs/${NETFS_PREFIX}/selinux.autorelabel" ] && { \
+[ -f "${BUILD_DIR}/outputfs/${NETFS_PREFIX}/selinux.autorelabel" ] && { \
 	touch /mnt/local/.autorelabel
 	Log "Created /.autorelabel file : after reboot SELinux will relabel all files"
 	}

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/verify/NETFS/default/08_start_required_daemons.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,7 +1,8 @@
 #
 # start required daemons, like portmap
 #
-case "$NETFS_PROTO" in
+local scheme=$(url_scheme "$NETFS_URL")
+case "$scheme" in
 	nfs)
 		# newer Linux distros use rpcbind instead of portmap
 		if has_binary portmap; then

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-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/verify/NETFS/default/55_check_backup_archive.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,9 +1,11 @@
 # check wether the archive is actually there
 
 # Don't check when backup is on a tape device
-if [ "$NETFS_PROTO" == "tape" ]; then
-	return
-fi
+case $(url_scheme "$NETFS_URL") in
+    (tape)
+        return 0
+        ;;
+esac
 
 [ -s "$backuparchive" -o -d "$backuparchive" ]
 StopIfError "Backup archive '$backuparchive' not found !"

Modified: trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh
===================================================================
--- trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh	2011-08-03 07:32:58 UTC (rev 695)
+++ trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh	2011-08-06 16:01:35 UTC (rev 696)
@@ -1,7 +1,7 @@
 # Detect all backups on the USB device
 backups=()
 backup_times=()
-for rear_run in $BUILD_DIR/netfs/rear/$(uname -n)/* ;do
+for rear_run in $BUILD_DIR/outputfs/rear/$(uname -n)/* ;do
     Debug "Rear run $rear_run detected."
     backup_name=$rear_run/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}
     if [ -e $backup_name ] ; then


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