diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-06-05 15:34:40 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-06-05 15:34:40 +0300 |
commit | a6badbd2bdd4235fefbd84d3046130d2e8009356 (patch) | |
tree | 6fdde91bcd7012a13afc1d197eb842e9536c9ab9 | |
parent | d79d3ec3156e6a20d8eeabf9302fa21fe13d732c (diff) | |
download | beam-a6badbd2bdd4235fefbd84d3046130d2e8009356.tar.gz beam-a6badbd2bdd4235fefbd84d3046130d2e8009356.tar.bz2 |
Bugfixes
* lib/beam/s3.sh (s3_unmount): Implement --force option.
Unless it is given, unmount only mount points from $umount_list.
* s3.in: Pass --force option to s3_unmount.
* restore.in (getyn): Fix a bashism.
-rw-r--r-- | lib/beam/s3.sh | 17 | ||||
-rw-r--r-- | restore.in | 2 | ||||
-rw-r--r-- | s3.in | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/lib/beam/s3.sh b/lib/beam/s3.sh index 39416d7..a89220d 100644 --- a/lib/beam/s3.sh +++ b/lib/beam/s3.sh @@ -81,9 +81,16 @@ s3_mount() { s3_unmount() { - for id in s3 backer - do - mpoint=$(s3_getmpoint $id) - test -n "$mpoint" && $dry_run umount $mpoint - done + if test -- "$1" = "--force"; do + for id in s3 backer + do + mpoint=$(s3_getmpoint $id) + test -n "$mpoint" && $dry_run umount $mpoint + done + else + for mpoint in $umount_list + do + test -n "$mpoint" && $dry_run umount $mpoint + done + fi } @@ -38,7 +38,7 @@ confirm=1 getyn() { echo -n "$0:" $* " [Y/n]? " - read + read REPLY case $REPLY in ''|y*|Y*) REPLY=y;; *) REPLY=n;; @@ -70,7 +70,7 @@ mount) s3_mount echo "$backup_bucket_name mounted under $backup_mp_s3";; umount|unmount) - s3_unmount;; + s3_unmount --force;; status) for id in s3 backer do |