]>
Commit | Line | Data |
---|---|---|
2bd0ea18 NS |
1 | #!/bin/sh -f |
2 | # | |
0d3e0b37 | 3 | # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. |
dfc130f3 | 4 | # |
2bd0ea18 NS |
5 | # This program is free software; you can redistribute it and/or modify it |
6 | # under the terms of version 2 of the GNU General Public License as | |
7 | # published by the Free Software Foundation. | |
dfc130f3 | 8 | # |
2bd0ea18 NS |
9 | # This program is distributed in the hope that it would be useful, but |
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
dfc130f3 | 12 | # |
2bd0ea18 NS |
13 | # Further, this software is distributed without any warranty that it is |
14 | # free of the rightful claim of any third person regarding infringement | |
15 | # or the like. Any license provided herein, whether implied or | |
16 | # otherwise, applies only to this software file. Patent licenses, if | |
17 | # any, provided herein do not apply to combinations of this program with | |
18 | # other software, or any other product whatsoever. | |
dfc130f3 | 19 | # |
2bd0ea18 NS |
20 | # You should have received a copy of the GNU General Public License along |
21 | # with this program; if not, write the Free Software Foundation, Inc., 59 | |
22 | # Temple Place - Suite 330, Boston MA 02111-1307, USA. | |
dfc130f3 | 23 | # |
2bd0ea18 NS |
24 | # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, |
25 | # Mountain View, CA 94043, or: | |
dfc130f3 RC |
26 | # |
27 | # http://www.sgi.com | |
28 | # | |
29 | # For further information regarding this notice, see: | |
30 | # | |
2bd0ea18 NS |
31 | # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ |
32 | # | |
33 | ||
34 | OPTS="" | |
4ca431fc | 35 | USAGE="Usage: xfs_admin [-efluV] [-L label] [-U uuid] special" |
2bd0ea18 | 36 | |
4ca431fc | 37 | while getopts "efluL:U:V" c |
2bd0ea18 NS |
38 | do |
39 | case $c in | |
4ca431fc | 40 | e) OPTS=$OPTS" -c 'version extflg'";; |
2bd0ea18 | 41 | f) OPTS=$OPTS" -f";; |
b58c339a | 42 | l) OPTS=$OPTS" -r -c label";; |
2bd0ea18 | 43 | L) OPTS=$OPTS" -c 'label "$OPTARG"'";; |
b58c339a | 44 | u) OPTS=$OPTS" -r -c uuid";; |
2bd0ea18 | 45 | U) OPTS=$OPTS" -c 'uuid "$OPTARG"'";; |
9440d84d | 46 | V) OPTS=$OPTS" -V";; |
2bd0ea18 NS |
47 | \?) echo $USAGE 1>&2 |
48 | exit 2 | |
49 | ;; | |
50 | esac | |
51 | done | |
52 | set -- extra $@ | |
53 | shift $OPTIND | |
54 | case $# in | |
55 | 1) eval xfs_db -x -p xfs_admin $OPTS $1 | |
56 | status=$? | |
57 | ;; | |
58 | *) echo $USAGE 1>&2 | |
59 | exit 2 | |
60 | ;; | |
61 | esac | |
62 | exit $status |