diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/aoe/mkdevs.sh |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'Documentation/aoe/mkdevs.sh')
-rw-r--r-- | Documentation/aoe/mkdevs.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/aoe/mkdevs.sh b/Documentation/aoe/mkdevs.sh new file mode 100644 index 000000000000..6ce70703eb47 --- /dev/null +++ b/Documentation/aoe/mkdevs.sh | |||
@@ -0,0 +1,36 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | n_shelves=${n_shelves:-10} | ||
4 | n_partitions=${n_partitions:-16} | ||
5 | |||
6 | if test "$#" != "1"; then | ||
7 | echo "Usage: sh `basename $0` {dir}" 1>&2 | ||
8 | exit 1 | ||
9 | fi | ||
10 | dir=$1 | ||
11 | |||
12 | MAJOR=152 | ||
13 | |||
14 | echo "Creating AoE devnode files in $dir ..." | ||
15 | |||
16 | set -e | ||
17 | |||
18 | mkdir -p $dir | ||
19 | |||
20 | # (Status info is in sysfs. See status.sh.) | ||
21 | # rm -f $dir/stat | ||
22 | # mknod -m 0400 $dir/stat c $MAJOR 1 | ||
23 | rm -f $dir/err | ||
24 | mknod -m 0400 $dir/err c $MAJOR 2 | ||
25 | rm -f $dir/discover | ||
26 | mknod -m 0200 $dir/discover c $MAJOR 3 | ||
27 | rm -f $dir/interfaces | ||
28 | mknod -m 0200 $dir/interfaces c $MAJOR 4 | ||
29 | |||
30 | export n_partitions | ||
31 | mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'` | ||
32 | i=0 | ||
33 | while test $i -lt $n_shelves; do | ||
34 | sh -xc "sh $mkshelf $dir $i" | ||
35 | i=`expr $i + 1` | ||
36 | done | ||