diff options
author | Dimitri John Ledkov <dimitri.j.ledkov@intel.com> | 2015-05-21 13:50:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-05-21 16:53:44 +0200 |
commit | 7f1ccecfaaffcda4cfe11b315dbca0b899f4f8aa (patch) | |
tree | b37be89379f80221f8a303476c2d2913c56b1f3c /fsck.btrfs | |
parent | d6cedbcdd334174468f6f8815fb030b90704df74 (diff) |
btrfs-progs: fsck.btrfs: Fix bashism and bad getopts processing
First fix == bashism, as that is not accepted by e.g. Debian/Ubuntu
dash.
Secondly shift OPTIND, such that last parameter is checked to exist.
Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fsck.btrfs')
-rwxr-xr-x | fsck.btrfs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -26,12 +26,13 @@ do a|A|p|y) AUTO=true;; esac done +shift $(($OPTIND - 1)) eval DEV=\${$#} if [ ! -e $DEV ]; then echo "$0: $DEV does not exist" exit 8 fi -if [ "$AUTO" == "false" ]; then +if ! $AUTO; then echo "If you wish to check the consistency of a BTRFS filesystem or" echo "repair a damaged filesystem, see btrfs(8) subcommand 'check'." fi |