Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / demos / config.sh
1 #!/bin/sh
2 # File which holds configuation parameters in a single place to avoid any
3 # mismatch between scripts (especially the cleanup scripts, which are
4 # destructive).
5 #
6 # Copyright (C) 2001  Cluster File Systems, Inc.
7 #
8 # This code is issued under the GNU General Public License.
9 # See the file COPYING in this distribution
10 #set -vx
11
12 # Major number for OBD devices
13 OBDMAJ=186
14
15 # Module configuration file
16 [ -f /etc/conf.modules ] && MODCONF=/etc/conf.modules
17 [ -z "$MODCONF" -a -f /etc/modules.conf ] && MODCONF=/etc/modules.conf
18
19 # If LOOPDEV is empty (""), then no loopback device will be configured.
20 # If TMPFILE is empty (""), then no temporary file will be created for loop.
21 [ "$TMPFILE" ] || TMPFILE="/tmp/obdfs.tmpfile"
22 [ "$TMPSIZE" ] || TMPSIZE=10240
23 [ -b /dev/loop/0 ] && LOOPDEV=/dev/loop/0
24 [ -z "$LOOPDEV" -a -b /dev/loop0 ] && LOOPDEV="/dev/loop0"
25
26 # If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device
27 # that doesn't mind being overwritten - don't use a partition with data on it!!
28 LOOPDEV=""
29 BASEDEV="/dev/hda5"
30
31 # The following are mount points for the filesystems during the test.
32 MNTOBD="/mnt/obd"
33 MNTSNAP="/mnt/snap"
34 MNTSNAP2="/mnt/snap2"
35
36 # This is where the snapshot table will be stored:
37 SNAPTABLE="/tmp/obdfs.snaptable"
38
39 # A simple routine called by most of the scripts to help debugging.  The
40 # kernel code has a lot of debugging statements, so this helps us keep
41 # track of what is going on in user-land to generate the kernel messages.
42 plog () {
43     if [ "$1" = "log" ]; then
44         shift
45         logger -p kern.info "******** $* **********"
46         echo "$*"
47     else
48         logger -p kern.info "****start**** $* *****"
49         echo "$*"
50         $*
51         logger -p kern.info "*****end***** $* *****"
52     fi
53 }
54
55 # A routine to display a command, and prompt user if it should be run
56 qrun () {
57     echo
58     echo -n "Run '$*' [Y/n]?'";
59     read JUNK
60
61     case $JUNK in
62         n*|N*) echo "'$*' not run" ;;
63         *) plog $* ;;
64     esac
65 }