Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* move recover.c from llite to ptlrpc
[fs/lustre-release.git]
/
lustre
/
demos
/
config.sh
diff --git
a/lustre/demos/config.sh
b/lustre/demos/config.sh
index
825c1d6
..
4d19a29
100644
(file)
--- a/
lustre/demos/config.sh
+++ b/
lustre/demos/config.sh
@@
-2,19
+2,31
@@
# File which holds configuation parameters in a single place to avoid any
# mismatch between scripts (especially the cleanup scripts, which are
# destructive).
# File which holds configuation parameters in a single place to avoid any
# mismatch between scripts (especially the cleanup scripts, which are
# destructive).
+#
+# Copyright (C) 2001 Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
#set -vx
# Major number for OBD devices
OBDMAJ=186
#set -vx
# Major number for OBD devices
OBDMAJ=186
+# Module configuration file
+[ -f /etc/conf.modules ] && MODCONF=/etc/conf.modules
+[ -z "$MODCONF" -a -f /etc/modules.conf ] && MODCONF=/etc/modules.conf
+
# If LOOPDEV is empty (""), then no loopback device will be configured.
# If TMPFILE is empty (""), then no temporary file will be created for loop.
# If LOOPDEV is empty (""), then no loopback device will be configured.
# If TMPFILE is empty (""), then no temporary file will be created for loop.
-TMPFILE="/tmp/obdfs.tmpfile"
-LOOPDEV="/dev/loop0"
+[ "$TMPFILE" ] || TMPFILE="/tmp/obdfs.tmpfile"
+[ "$TMPSIZE" ] || TMPSIZE=10240
+[ -b /dev/loop/0 ] && LOOPDEV=/dev/loop/0
+[ -z "$LOOPDEV" -a -b /dev/loop0 ] && LOOPDEV="/dev/loop0"
# If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device
# that doesn't mind being overwritten - don't use a partition with data on it!!
# If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device
# that doesn't mind being overwritten - don't use a partition with data on it!!
-BASEDEV="$LOOPDEV"
+LOOPDEV="/dev/loop0"
+BASEDEV="/dev/loop0"
# The following are mount points for the filesystems during the test.
MNTOBD="/mnt/obd"
# The following are mount points for the filesystems during the test.
MNTOBD="/mnt/obd"
@@
-30,14
+42,24
@@
SNAPTABLE="/tmp/obdfs.snaptable"
plog () {
if [ "$1" = "log" ]; then
shift
plog () {
if [ "$1" = "log" ]; then
shift
- echo "******** $* **********" >> /var/log/messages
+ logger -p kern.info "******** $* **********"
echo "$*"
else
echo "$*"
else
- echo "****start**** $* *****" >> /var/log/messages
+ logger -p kern.info "****start**** $* *****"
echo "$*"
$*
echo "$*"
$*
- sleep 3 # to allow messages to be flushed
- echo "*****end***** $* *****" >> /var/log/messages
+ logger -p kern.info "*****end***** $* *****"
fi
}
fi
}
+# A routine to display a command, and prompt user if it should be run
+qrun () {
+ echo
+ echo -n "Run '$*' [Y/n]?'";
+ read JUNK
+
+ case $JUNK in
+ n*|N*) echo "'$*' not run" ;;
+ *) plog $* ;;
+ esac
+}