aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-06-05 15:34:40 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-06-05 15:34:40 +0300
commita6badbd2bdd4235fefbd84d3046130d2e8009356 (patch)
tree6fdde91bcd7012a13afc1d197eb842e9536c9ab9
parentd79d3ec3156e6a20d8eeabf9302fa21fe13d732c (diff)
downloadbeam-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.sh17
-rw-r--r--restore.in2
-rw-r--r--s3.in2
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
}
diff --git a/restore.in b/restore.in
index e9d730d..16a5430 100644
--- a/restore.in
+++ b/restore.in
@@ -38,7 +38,7 @@ confirm=1
getyn() {
echo -n "$0:" $* " [Y/n]? "
- read
+ read REPLY
case $REPLY in
''|y*|Y*) REPLY=y;;
*) REPLY=n;;
diff --git a/s3.in b/s3.in
index ab46017..e4d838f 100644
--- a/s3.in
+++ b/s3.in
@@ -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

Return to:

Send suggestions and report system problems to the System administrator.