X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fdemos%2Fconfig.sh;h=51f4df545941f9e39684e8daba2656ebd161cb6c;hb=8f683c05db2320fe40736bdd09779aa646aff13b;hp=ece6beafaf17cc82c508033fba5e8ad334e1ae14;hpb=6d0e286de59a257b0e5ac887c8db50edbdc9b0f5;p=fs%2Flustre-release.git diff --git a/lustre/demos/config.sh b/lustre/demos/config.sh index ece6bea..51f4df5 100644 --- a/lustre/demos/config.sh +++ b/lustre/demos/config.sh @@ -4,9 +4,17 @@ # destructive). #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. -TMPFILE="/tmp/obdfs.tmpfile" +[ "$TMPFILE" ] || TMPFILE="/tmp/obdfs.tmpfile" +[ "$TMPSIZE" ] || TMPSIZE=10240 LOOPDEV="/dev/loop0" # If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device @@ -25,17 +33,26 @@ SNAPTABLE="/tmp/obdfs.snaptable" # kernel code has a lot of debugging statements, so this helps us keep # track of what is going on in user-land to generate the kernel messages. plog () { - LOGMETH="kern.debug" if [ "$1" = "log" ]; then - logger -p $LOGMETH "******** $* **********" shift + logger -p kern.info "******** $* **********" echo "$*" else - logger -p $LOGMETH "****start**** $* *****" + logger -p kern.info "****start**** $* *****" echo "$*" $* - sleep 3 - logger -p $LOGMETH "*****end***** $* *****" + logger -p kern.info "*****end***** $* *****" 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 +}