File tree 4 files changed +9
-5
lines changed
4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
Name: asmdisks
2
2
Summary: Replacement for Oracle ASMLib using UDEV
3
- Version: 1.4.5.1
3
+ Version: 1.4.5.2
4
4
Release: 1%{?dtap }
5
5
BuildArch: noarch
6
6
License: GPLv3+
Original file line number Diff line number Diff line change
1
+ * Wed Nov 12 Bart Sjerps <bart@outrun.nl> 1.4.5.2
2
+ - Fix usage/no parameters
3
+
1
4
* Wed Nov 07 Bart Sjerps <bart@outrun.nl> 1.4.5.1
2
5
- List of changes to asm:
3
6
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ while getopts ":hb:c:w:" OPT; do
30
30
done
31
31
shift $( expr $OPTIND - 1)
32
32
33
- test -z " $1 " && usage && exit
33
+ test -z " $1 " && die " no disk specified "
34
34
test -b " $1 " || die " $1 is not a block device"
35
35
36
36
dd if=" $1 " bs=${blksz:- 1024} count=${count:- 1} status=none | xxd -c ${width:- 32}
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ case $1 in
13
13
-\? |--help) man $( basename $0 ) ; exit ;;
14
14
esac
15
15
16
+ die () { echo " $( basename $0 ) : [die] $@ " >&2 ; exit 10 ; }
17
+
16
18
# ============================================================================
17
19
# Main section - parsing options etc
18
20
# ---------------------------------------------------------------------------
@@ -23,13 +25,12 @@ while getopts ":hfn" OPT; do
23
25
esac
24
26
done
25
27
shift $( expr $OPTIND - 1)
26
- test $# -lt 1 && { usage ; exit 10 ; }
28
+ test $# -lt 1 && die " no parameters "
27
29
28
30
if [ " $FORCE " == " Y" ]; then
29
31
DISK=${1:- nodisk}
30
32
if [ ! -b $DISK ]; then
31
- echo " $DISK not found"
32
- exit 1
33
+ die " $DISK not found"
33
34
fi
34
35
BKUP=$( echo $DISK | tr ' /' ' _' )
35
36
echo " Backing up 1st MB of $DISK in /tmp/$BKUP , restore with dd if=/tmp/$BKUP of=/dev/$DISK bs=1M count=1"
You can’t perform that action at this time.
0 commit comments