003 File Manager
Current Path:
/usr/src/tests/sys/geom/class/mirror
usr
/
src
/
tests
/
sys
/
geom
/
class
/
mirror
/
📁
..
📄
10_test.sh
(1.6 KB)
📄
11_test.sh
(2.08 KB)
📄
12_test.sh
(1.62 KB)
📄
13_test.sh
(2.01 KB)
📄
1_test.sh
(432 B)
📄
2_test.sh
(1.26 KB)
📄
3_test.sh
(1.47 KB)
📄
4_test.sh
(1.49 KB)
📄
5_test.sh
(1.49 KB)
📄
6_test.sh
(1.13 KB)
📄
7_test.sh
(1.47 KB)
📄
8_test.sh
(1.42 KB)
📄
9_test.sh
(1.84 KB)
📄
Makefile
(560 B)
📄
Makefile.depend
(176 B)
📄
component_selection.sh
(4.18 KB)
📄
conf.sh
(836 B)
📄
sync_error.sh
(2.91 KB)
Editing: conf.sh
#!/bin/sh # $FreeBSD$ name="$(mktemp -u mirror.XXXXXX)" class="mirror" base=`basename $0` gmirror_test_cleanup() { [ -c /dev/$class/$name ] && gmirror destroy $name geom_test_cleanup } trap gmirror_test_cleanup ABRT EXIT INT TERM gmirror_worker_pid() { pgrep -S -n "g_mirror mirror\..*" } syncwait() { while $(gmirror status -s $name | grep -q SYNCHRONIZING); do sleep 0.1; done } consumerrefs() { gclass=$1 geom=$2 if [ $# -ne 2 ]; then echo "Bad usage consumerrefs" >&2 exit 1 fi geom "${gclass}" list "${geom}" | \ grep -A5 ^Consumers | \ grep Mode | \ cut -d: -f2 } disconnectwait() { gclass=$1 geom=$2 if [ $# -ne 2 ]; then echo "Bad usage disconnectwait" >&2 exit 1 fi while [ $(consumerrefs "$gclass" "$geom") != r0w0e0 ]; do sleep 0.05 done } . `dirname $0`/../geom_subr.sh
Upload File
Create Folder