forked from luck/tmp_suning_uos_patched
1da177e4c3
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!
37 lines
666 B
Bash
37 lines
666 B
Bash
#!/bin/sh
|
|
|
|
n_shelves=${n_shelves:-10}
|
|
n_partitions=${n_partitions:-16}
|
|
|
|
if test "$#" != "1"; then
|
|
echo "Usage: sh `basename $0` {dir}" 1>&2
|
|
exit 1
|
|
fi
|
|
dir=$1
|
|
|
|
MAJOR=152
|
|
|
|
echo "Creating AoE devnode files in $dir ..."
|
|
|
|
set -e
|
|
|
|
mkdir -p $dir
|
|
|
|
# (Status info is in sysfs. See status.sh.)
|
|
# rm -f $dir/stat
|
|
# mknod -m 0400 $dir/stat c $MAJOR 1
|
|
rm -f $dir/err
|
|
mknod -m 0400 $dir/err c $MAJOR 2
|
|
rm -f $dir/discover
|
|
mknod -m 0200 $dir/discover c $MAJOR 3
|
|
rm -f $dir/interfaces
|
|
mknod -m 0200 $dir/interfaces c $MAJOR 4
|
|
|
|
export n_partitions
|
|
mkshelf=`echo $0 | sed 's!mkdevs!mkshelf!'`
|
|
i=0
|
|
while test $i -lt $n_shelves; do
|
|
sh -xc "sh $mkshelf $dir $i"
|
|
i=`expr $i + 1`
|
|
done
|