Add option to not remount target on backup
This commit is contained in:
@@ -82,7 +82,9 @@ step_3_info() {
|
||||
}
|
||||
step_3_alias() { ALIAS="budir"; }
|
||||
step_3() {
|
||||
local arg
|
||||
local configTarget=0
|
||||
local noRemount=0
|
||||
local buSource=
|
||||
local buTarget=
|
||||
local buExcludes=
|
||||
@@ -90,10 +92,16 @@ step_3() {
|
||||
# don't use step number
|
||||
shift
|
||||
|
||||
if [ "$1" == "-t" ] ; then
|
||||
for arg in "$@"; do
|
||||
case "$1" in
|
||||
-t)
|
||||
configTarget=1
|
||||
shift
|
||||
fi
|
||||
shift;;
|
||||
-n)
|
||||
noRemount=1
|
||||
shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
echoerr " [E] Nothing found to backup $1"
|
||||
@@ -144,9 +152,11 @@ step_3() {
|
||||
tmpTarget="${buTarget}/"
|
||||
fi
|
||||
|
||||
if [ $noRemount -eq 0 ]; then
|
||||
# remount target to be writable
|
||||
exep "mount -o rw,remount '${buTarget}' >>/dev/null 2>&1"
|
||||
endReturn -o $? "Remount (${buTarget}) to be writable failed"
|
||||
fi
|
||||
|
||||
if [ ! -w "${buTarget}" ] ; then
|
||||
echoerr " [E] Backup target (${buTarget}) is not writable"
|
||||
|
Reference in New Issue
Block a user