diff --git a/seqs/backup.sh b/seqs/backup.sh index f3e3c21..2394322 100755 --- a/seqs/backup.sh +++ b/seqs/backup.sh @@ -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 - configTarget=1 - shift - fi + for arg in "$@"; do + case "$1" in + -t) + configTarget=1 + 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 - # remount target to be writable - exep "mount -o rw,remount '${buTarget}' >>/dev/null 2>&1" - endReturn -o $? "Remount (${buTarget}) to be writable failed" + 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"