Changes between Version 2 and Version 3 of S3QLMnt
- Timestamp:
- Oct 8, 2015, 12:30:49 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3QLMnt
v2 v3 8 8 9 9 {{{ 10 #!bash 10 11 #!/bin/bash 11 12 … … 58 59 59 60 {{{ 61 #!bash 60 62 #!/bin/bash 61 63 … … 74 76 fi 75 77 76 # check for bucket name / directory on standard input 77 if [[ $1 ]]; then 78 BUCKET=$1 79 elif [[ ! $1 ]]; then 80 echo "Type the bucketname and then [ENTER]:" 81 read bucket 82 BUCKET=$bucket 78 # check for the number of arguments 79 if [[ "$2" ]]; then 80 if [[ "$1" == "--force" ]]; then 81 # force needed 82 FORCE="1" 83 BUCKET="$2" 84 else 85 echo "Please use this command like this: $0 --force bucketname" 86 exit 0 87 fi 88 else 89 # check for bucket name / directory on standard input 90 if [[ "$1" ]]; then 91 BUCKET="$1" 92 elif [[ ! "$1" ]]; then 93 echo "Type the bucketname and then [ENTER]:" 94 read bucket 95 BUCKET=$bucket 96 fi 83 97 fi 84 98 85 99 # if force is needed 86 if [[ $1 == "--force" ]]; then100 if [[ "$FORCE" ]]; then 87 101 fusermount -u -z ${MOUNT}/${BUCKET} 88 102 killall -9 mount.s3ql 89 103 # file system check with force 90 fsck.s3ql --batch --force ${SERVER}/${BUCKET}104 fsck.s3ql --batch --force --backend-options="dumb-copy" ${SERVER}/${BUCKET} 91 105 else 92 106 # unmount 93 107 umount.s3ql ${MOUNT}/${BUCKET} 94 108 # check the file system 95 fsck.s3ql --batch ${SERVER}/${BUCKET}109 fsck.s3ql --batch --backend-options="dumb-copy" ${SERVER}/${BUCKET} 96 110 fi 97 111