svn commit: r228949 - projects/stress2/misc
Peter Holm
pho at FreeBSD.org
Thu Dec 29 11:36:25 UTC 2011
Author: pho
Date: Thu Dec 29 11:36:24 2011
New Revision: 228949
URL: http://svn.freebsd.org/changeset/base/228949
Log:
Use the global configuration file for MD(4) operations.
Modified:
projects/stress2/misc/snap2-1.sh
Modified: projects/stress2/misc/snap2-1.sh
==============================================================================
--- projects/stress2/misc/snap2-1.sh Thu Dec 29 11:35:12 2011 (r228948)
+++ projects/stress2/misc/snap2-1.sh Thu Dec 29 11:36:24 2011 (r228949)
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2008 Peter Holm <pho at FreeBSD.org>
+# Copyright (c) 2008, 2011 Peter Holm <pho at FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,8 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
+. ../default.cfg
+
# Regression test: Delete an active md device
#
# panic(c088cd33,deadc000,c0943aa0,0,c08753e1) at panic+0x14b
@@ -43,16 +45,16 @@
rm -f /tmp/.snap/pho
[ -d /tmp/.snap ] || mkdir /tmp/.snap
trap "rm -f /tmp/.snap/pho" 0
-mount | grep "/mnt" | grep md0 > /dev/null && umount /mnt
-mdconfig -l | grep -q md0 && mdconfig -d -u 0
+mount | grep "$mntpoint" | grep -q md$mdstart && umount $mntpoint
+mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart
mksnap_ffs /tmp /tmp/.snap/pho
-mdconfig -a -t vnode -o readonly -f /tmp/.snap/pho -u 0
-mount -o ro /dev/md0 /mnt
+mdconfig -a -t vnode -o readonly -f /tmp/.snap/pho -u $mdstart
+mount -o ro /dev/md$mdstart $mntpoint
-ls -lR /mnt > /dev/null 2>&1 &
-mdconfig -d -u 0 > /dev/null 2>&1
+ls -lR $mntpoint > /dev/null 2>&1 &
+mdconfig -d -u $mdstart > /dev/null 2>&1
-umount -f /mnt
-mdconfig -d -u 0
+umount -f $mntpoint
+mdconfig -d -u $mdstart
rm -f /tmp/.snap/pho
More information about the svn-src-projects
mailing list