Whamcloud - gitweb
Updates for Debian, devfs, and the device command.
authorgord-fig <gord-fig>
Tue, 25 Sep 2001 22:19:48 +0000 (22:19 +0000)
committergord-fig <gord-fig>
Tue, 25 Sep 2001 22:19:48 +0000 (22:19 +0000)
lustre/demos/basesetup.sh
lustre/demos/config.sh
lustre/demos/obdfsclean.sh
lustre/demos/obdfssetup.sh

index c301630..86bdd97 100755 (executable)
@@ -8,7 +8,13 @@ OBDDIR="`dirname $0`/.."
 # module configuration
 if [ "$MODCONF" -a -f $MODCONF ]; then
     if [ -z "`grep -i "alias  *char-major-$OBDMAJ  *obdclass" $MODCONF`" ]; then
-         echo "alias char-major-${OBDMAJ} obdclass" >>$MODCONF
+       if [ -d /etc/modutils ]; then
+           # Debian-style modules configuration.
+           echo "alias char-major-${OBDMAJ} obdclass" > /etc/modutils/obd
+           update-modules
+       else
+           echo "alias char-major-${OBDMAJ} obdclass" >>$MODCONF
+       fi
     fi
 fi
 
index 51f4df5..96d074d 100644 (file)
@@ -15,7 +15,8 @@ OBDMAJ=186
 # If TMPFILE is empty (""), then no temporary file will be created for loop.
 [ "$TMPFILE" ] || TMPFILE="/tmp/obdfs.tmpfile"
 [ "$TMPSIZE" ] || TMPSIZE=10240
-LOOPDEV="/dev/loop0"
+[ -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!!
index 6a888a7..a001c5e 100755 (executable)
@@ -9,6 +9,7 @@ plog rmmod obdfs
 
 plog log "CLEANUP/DETACH"
 $OBDDIR/class/obdcontrol -f << EOF
+device /dev/obd0
 cleanup
 detach
 quit
index 81ca302..46dcc2b 100755 (executable)
@@ -17,6 +17,7 @@ fi
 
 plog log "ATTACHING /dev/obd0, SETUP $BASEDEV"
 $OBDDIR/class/obdcontrol -f << EOF
+device /dev/obd0
 attach obdext2
 setup $BASEDEV
 quit