1b138878dSdrahn#!/bin/sh - 2b138878dSdrahn# 3b138878dSdrahn# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. 4b138878dSdrahn# generated from: 5b138878dSdrahn# 6*80556d8aStodd# OpenBSD: etc.landisk/MAKEDEV.md,v 1.7 2007/05/28 22:26:02 todd Exp 72aa53020Stodd# OpenBSD: MAKEDEV.common,v 1.34 2007/05/18 14:05:33 jmc Exp 8b138878dSdrahn# OpenBSD: MAKEDEV.mi,v 1.77 2005/10/06 06:43:19 otto Exp 9b138878dSdrahn# OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp 10b138878dSdrahn# 11b138878dSdrahn# 12b138878dSdrahn# Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org> 13b138878dSdrahn# 14b138878dSdrahn# Permission to use, copy, modify, and distribute this software for any 15b138878dSdrahn# purpose with or without fee is hereby granted, provided that the above 16b138878dSdrahn# copyright notice and this permission notice appear in all copies. 17b138878dSdrahn# 18b138878dSdrahn# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 19b138878dSdrahn# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 20b138878dSdrahn# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 21b138878dSdrahn# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22b138878dSdrahn# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23b138878dSdrahn# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 24b138878dSdrahn# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25b138878dSdrahn# 262aa53020Stodd 27b138878dSdrahn# Device "make" file. Valid arguments: 28b138878dSdrahn# all makes all known devices, including local devices. 29b138878dSdrahn# Tries to make the ``standard'' number of each type. 30b138878dSdrahn# ramdisk Ramdisk kernel devices 31b138878dSdrahn# std Standard devices 32b138878dSdrahn# local Configuration specific devices 33b138878dSdrahn# Disks: 34b138878dSdrahn# ccd* Concatenated disk devices 35b138878dSdrahn# cd* ATAPI and SCSI CD-ROM drives 36b138878dSdrahn# ch* SCSI media changers 37b138878dSdrahn# raid* RAIDframe disk devices 38b138878dSdrahn# rd* "rd" pseudo-disks 39b138878dSdrahn# sd* SCSI disks, including flopticals 40b138878dSdrahn# vnd* "file" pseudo-disk devices 41b138878dSdrahn# wd* "winchester" disk drives (ST506, IDE, ESDI, RLL, ...) 42b138878dSdrahn# Tapes: 43b138878dSdrahn# st* SCSI tape drives 44b138878dSdrahn# Terminal ports: 450396b47eSmiod# ttya on-board serial port 46b138878dSdrahn# Pseudo terminals: 47b138878dSdrahn# ptm pty master device 48b138878dSdrahn# pty* Set of 62 master pseudo terminals 49b138878dSdrahn# tty* Set of 62 slave pseudo terminals 50b138878dSdrahn# Console ports: 51b138878dSdrahn# wscons Minimal wscons devices 52b138878dSdrahn# ttyC-J* wscons display devices 53b138878dSdrahn# wskbd* wscons keyboards 54b138878dSdrahn# wsmouse* wscons mice 55b138878dSdrahn# wsmux wscons keyboard/mouse mux devices 56b138878dSdrahn# USB devices: 57b138878dSdrahn# uall All USB devices 58b138878dSdrahn# ttyU* USB serial ports 59b138878dSdrahn# ugen* Generic USB devices 60b138878dSdrahn# uhid* Generic HID devices 61b138878dSdrahn# ulpt* Printer devices 62b138878dSdrahn# urio* Diamond Multimedia Rio 500 63b138878dSdrahn# usb* Bus control devices used by usbd for attach/detach 64b138878dSdrahn# uscanner* Scanners 65b138878dSdrahn# Special purpose devices: 66b138878dSdrahn# audio* Audio devices 67*80556d8aStodd# bio ioctl tunnel pseudo-device 68b138878dSdrahn# hotplug devices hot plugging 69b138878dSdrahn# bpf* Berkeley Packet Filter 70b138878dSdrahn# crypto Hardware crypto access driver 71b138878dSdrahn# fd fd/* nodes 72b138878dSdrahn# lkm Loadable kernel modules interface 734e7d0674Skettenis# pci* PCI bus devices 74b138878dSdrahn# pf* Packet Filter 75b138878dSdrahn# radio* FM tuner devices 76b138878dSdrahn# *random In-kernel random data source 77b138878dSdrahn# tun* Network tunnel driver 78b138878dSdrahn# uk* Unknown SCSI devices 79b138878dSdrahn# ss* SCSI scanners 80b138878dSdrahn# systrace* System call tracing device 81b138878dSdrahn# xfs* XFS filesystem node 82b138878dSdrahnPATH=/sbin:/usr/sbin:/bin:/usr/bin 83b138878dSdrahnT=$0 84b138878dSdrahn 85b138878dSdrahn# set this to echo for Echo-Only debugging 86b138878dSdrahn[ "$eo" ] || eo= 87b138878dSdrahn 88b138878dSdrahnhex() 89b138878dSdrahn{ 90b138878dSdrahn case $1 in 91b138878dSdrahn [0-9]) echo -n $1;; 92b138878dSdrahn 10) echo -n a;; 93b138878dSdrahn 11) echo -n b;; 94b138878dSdrahn 12) echo -n c;; 95b138878dSdrahn 13) echo -n d;; 96b138878dSdrahn 14) echo -n e;; 97b138878dSdrahn 15) echo -n f;; 98b138878dSdrahn esac 99b138878dSdrahn} 100b138878dSdrahn 101b138878dSdrahnalph2d() 102b138878dSdrahn{ 103b138878dSdrahn local t="$1" 104b138878dSdrahn local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 105b138878dSdrahn local sub=${p%${t}*} 106b138878dSdrahn echo ${#sub} 107b138878dSdrahn} 108b138878dSdrahn 109b138878dSdrahnh2d() 110b138878dSdrahn{ 111b138878dSdrahn local s="$1" 112b138878dSdrahn local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*} 113b138878dSdrahn 114b138878dSdrahn echo $(($(_h2d $f)*16+ $(_h2d $n) )) 115b138878dSdrahn} 116b138878dSdrahn 117b138878dSdrahn_h2d() 118b138878dSdrahn{ 119b138878dSdrahn case $1 in 120b138878dSdrahn [0-9]) echo -n $1;; 121b138878dSdrahn a) echo -n 10;; 122b138878dSdrahn b) echo -n 11;; 123b138878dSdrahn c) echo -n 12;; 124b138878dSdrahn d) echo -n 13;; 125b138878dSdrahn e) echo -n 14;; 126b138878dSdrahn f) echo -n 15;; 127b138878dSdrahn esac 128b138878dSdrahn} 129b138878dSdrahn 130b138878dSdrahnunt() 131b138878dSdrahn{ 132b138878dSdrahn # XXX pdksh can't seem to deal with locally scoped variables 133b138878dSdrahn # in ${foo#$bar} expansions 134b138878dSdrahn arg="$1" 135b138878dSdrahn tmp="${arg#[a-zA-Z]*}" 136b138878dSdrahn tmp="${tmp%*[a-zA-Z]}" 137b138878dSdrahn while [ "$tmp" != "$arg" ] 138b138878dSdrahn do 139b138878dSdrahn arg=$tmp 140b138878dSdrahn tmp="${arg#[a-zA-Z]*}" 141b138878dSdrahn tmp="${tmp%*[a-zA-Z]}" 142b138878dSdrahn done 143b138878dSdrahn echo $arg 144b138878dSdrahn} 145b138878dSdrahn 146b138878dSdrahndodisk() 147b138878dSdrahn{ 148b138878dSdrahn [ "$DEBUG" ] && set -x 149b138878dSdrahn n=$(($((${5}*${7:-16}))+${6})) count=0 150b138878dSdrahn [ 0$7 -ne 8 ] && l="i j k l m n o p" 151b138878dSdrahn for d in a b c d e f g h $l 152b138878dSdrahn do 153b138878dSdrahn M $1$2$d b $3 $(($n+$count)) 640 operator 154b138878dSdrahn M r$1$2$d c $4 $(($n+$count)) 640 operator 155b138878dSdrahn let count=count+1 156b138878dSdrahn done 157b138878dSdrahn} 158b138878dSdrahn 159b138878dSdrahndodisk2() 160b138878dSdrahn{ 161b138878dSdrahn n=$(($(($5*${7:-16}))+$6)) 162b138878dSdrahn M $1$2a b $3 $n 640 operator 163b138878dSdrahn M r$1$2a c $4 $n 640 operator 164b138878dSdrahn n=$(($n+2)) 165b138878dSdrahn M $1$2c b $3 $n 640 operator 166b138878dSdrahn M r$1$2c c $4 $n 640 operator 167b138878dSdrahn} 168b138878dSdrahn 169b138878dSdrahn# M name b/c major minor [mode] [group] 170b138878dSdrahnRMlist[0]="rm -f" 171b138878dSdrahn 172b138878dSdrahnmkl() { 173b138878dSdrahn mklist[${#mklist[*]}]=";mknod -m $1 $2 $3 $4 $5" 174b138878dSdrahn} 175b138878dSdrahn 176b138878dSdrahnM() { 177b138878dSdrahn RMlist[${#RMlist[*]}]=$1 178b138878dSdrahn mkl ${5-666} $1 $2 $3 $4 179b138878dSdrahn G=${6:-wheel} 180b138878dSdrahn [ "$7" ] && { 181b138878dSdrahn MKlist[${#MKlist[*]}]=";chown $7:$G $1" 182b138878dSdrahn } || { 183b138878dSdrahn case $G in 184b138878dSdrahn wheel) 185b138878dSdrahn [ ${#whlist[*]} = 0 ] && whlist[0]=";chgrp wheel" 186b138878dSdrahn whlist[${#whlist[*]}]="$1" 187b138878dSdrahn ;; 188b138878dSdrahn operator) 189b138878dSdrahn [ ${#oplist[*]} = 0 ] && oplist[0]=";chgrp operator" 190b138878dSdrahn oplist[${#oplist[*]}]="$1" 191b138878dSdrahn ;; 192b138878dSdrahn *) 193b138878dSdrahn MKlist[${#MKlist[*]}]=";chgrp $G $1"; 194b138878dSdrahn esac 195b138878dSdrahn } 196b138878dSdrahn return 0 197b138878dSdrahn} 198b138878dSdrahn 199b138878dSdrahnR() { 200b138878dSdrahn[ "$DEBUG" ] && set -x 201b138878dSdrahnfor i in "$@" 202b138878dSdrahndo 203b138878dSdrahnU=`unt $i` 204b138878dSdrahn[ "$U" ] || U=0 205b138878dSdrahn 206b138878dSdrahncase $i in 207b138878dSdrahnramdisk) 208b138878dSdrahn R std bpf0 wd0 wd1 sd0 tty00 rd0 wsmouse 209b138878dSdrahn R st0 ttyC0 random wskbd0 apm 210b138878dSdrahn ;; 211b138878dSdrahn 212b138878dSdrahnstd) 213b138878dSdrahn M console c 0 0 600 214b138878dSdrahn M tty c 1 0 215b138878dSdrahn M mem c 2 0 640 kmem 216b138878dSdrahn M kmem c 2 1 640 kmem 217b138878dSdrahn M null c 2 2 218b138878dSdrahn M zero c 2 12 219b138878dSdrahn M stdin c 7 0 220b138878dSdrahn M stdout c 7 1 221b138878dSdrahn M stderr c 7 2 222b138878dSdrahn M ksyms c 8 0 640 kmem 223b138878dSdrahn M drum c 3 0 640 kmem 224b138878dSdrahn M klog c 6 0 600 225b138878dSdrahn ;; 226b138878dSdrahn 227b138878dSdrahnxfs*) 228b138878dSdrahn M xfs$U c 51 $U 600 229b138878dSdrahn ;; 230b138878dSdrahn 231b138878dSdrahnsystrace) 232b138878dSdrahn M systrace c 50 0 644 233b138878dSdrahn ;; 234b138878dSdrahn 235b138878dSdrahnss*) 236b138878dSdrahn M ss$U c 29 $(($U*16)) 640 operator 237b138878dSdrahn M nss$U c 29 $(($(($U*16))+1)) 640 operator 238b138878dSdrahn M enss$U c 29 $(($(($U*16))+3)) 640 operator 239b138878dSdrahn RMlist[${#RMlist[*]}]="scan$U" 240b138878dSdrahn MKlist[${#MKlist[*]}]=";umask 77;ln -s ss$U scan$U" 241b138878dSdrahn ;; 242b138878dSdrahn 243b138878dSdrahnuk*) 244b138878dSdrahn M uk$U c 28 $U 640 operator 245b138878dSdrahn ;; 246b138878dSdrahn 247b138878dSdrahntun*) 248b138878dSdrahn M tun$U c 33 $U 600 249b138878dSdrahn ;; 250b138878dSdrahn 251b138878dSdrahn*random) 252b138878dSdrahn n=0 253b138878dSdrahn for pre in " " s u p a 254b138878dSdrahn do 255b138878dSdrahn M ${pre}random c 40 $n 644 256b138878dSdrahn n=$(($n+1)) 257b138878dSdrahn done 258b138878dSdrahn ;; 259b138878dSdrahn 260b138878dSdrahnradio*) 261b138878dSdrahn M radio$U c 97 $U 262b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e radio ] || ln -s radio$U radio" 263b138878dSdrahn ;; 264b138878dSdrahn 265b138878dSdrahnpf*) 266b138878dSdrahn M pf c 46 0 600 267b138878dSdrahn ;; 268b138878dSdrahn 2694e7d0674Skettenispci*) 2704e7d0674Skettenis M pci$U c 88 $U 600 27179cdc5d1Skrw MKlist[${#MKlist[*]}]=";[ -h pci ] || ln -sf pci0 pci" 272b138878dSdrahn ;; 273b138878dSdrahn 274b138878dSdrahnlkm) 275b138878dSdrahn M lkm c 35 0 640 _lkm 276b138878dSdrahn ;; 277b138878dSdrahn 278b138878dSdrahnfd) 279b138878dSdrahn RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0 280b138878dSdrahn while [ $n -lt 64 ];do M fd/$n c 7 $n;n=$(($n+1));done 281b138878dSdrahn MKlist[${#MKlist[*]}]=";chmod 555 fd" 282b138878dSdrahn ;; 283b138878dSdrahn 284b138878dSdrahncrypto) 285b138878dSdrahn M crypto c 47 0 286b138878dSdrahn ;; 287b138878dSdrahn 288b138878dSdrahnbpf*) 289b138878dSdrahn M bpf$U c 22 $U 600 290b138878dSdrahn ;; 291b138878dSdrahn 292b138878dSdrahnhotplug) 293b138878dSdrahn M hotplug c 37 $U 400 294b138878dSdrahn ;; 295b138878dSdrahn 296*80556d8aStoddbio) 297*80556d8aStodd M bio c 37 0 600 298*80556d8aStodd ;; 299*80556d8aStodd 300b138878dSdrahnaudio*) 301b138878dSdrahn M sound$U c 36 $U 302b138878dSdrahn M mixer$U c 36 $(($U+16)) 303b138878dSdrahn M audio$U c 36 $(($U+128)) 304b138878dSdrahn M audioctl$U c 36 $(($U+192)) 305b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e audio ] || ln -s audio$U audio" 306b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e mixer ] || ln -s mixer$U mixer" 307b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e sound ] || ln -s sound$U sound" 308b138878dSdrahn MKlist[${#MKlist[*]}]=";[ -e audioctl ] || ln -s audioctl$U audioctl" 309b138878dSdrahn ;; 310b138878dSdrahn 311b138878dSdrahnuscanner*) 312b138878dSdrahn M uscanner$U c 69 $U 660 313b138878dSdrahn ;; 314b138878dSdrahn 315b138878dSdrahnusb*) 316b138878dSdrahn [ "$i" = "usb" ] && u= || u=$U 317b138878dSdrahn M usb$u c 64 $U 660 318b138878dSdrahn ;; 319b138878dSdrahn 320b138878dSdrahnurio*) 321b138878dSdrahn M urio$U c 67 $U 660 322b138878dSdrahn ;; 323b138878dSdrahn 324b138878dSdrahnulpt*) 325b138878dSdrahn M ulpt$U c 66 $U 660 326b138878dSdrahn ;; 327b138878dSdrahn 328b138878dSdrahnuhid*) 329b138878dSdrahn M uhid$U c 65 $U 660 330b138878dSdrahn ;; 331b138878dSdrahn 332b138878dSdrahnugen*) 333b138878dSdrahn n=$(($U*16)) 334b138878dSdrahn for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5} 335b138878dSdrahn do 336b138878dSdrahn M ugen$U.$j c 70 $(($n+10#$j)) 660 337b138878dSdrahn done 338b138878dSdrahn ;; 339b138878dSdrahn 340b138878dSdrahnttyU[0-9a-zA-Z]) 341b138878dSdrahn U=${i#ttyU*} 342b138878dSdrahn o=$(alph2d $U) 343b138878dSdrahn M ttyU$U c 68 $o 660 dialer uucp 344b138878dSdrahn M cuaU$U c 68 $(($o+128)) 660 dialer uucp 345b138878dSdrahn ;; 346b138878dSdrahn 347b138878dSdrahnuall) 348b138878dSdrahn R ttyU0 ttyU1 ttyU2 ttyU3 ugen0 ugen1 ulpt0 ulpt1 uhid0 uhid1 349b138878dSdrahn R uhid2 uhid3 uscanner0 urio0 usb0 usb1 usb2 usb3 usb4 usb5 350b138878dSdrahn ;; 351b138878dSdrahn 352b138878dSdrahnwsmux|wsmouse|wskbd) 353b138878dSdrahn M wsmouse c 63 0 600 354b138878dSdrahn M wskbd c 63 1 600 355b138878dSdrahn ;; 356b138878dSdrahn 357b138878dSdrahnwsmouse*) 358b138878dSdrahn M wsmouse$U c 62 $U 600 359b138878dSdrahn ;; 360b138878dSdrahn 361b138878dSdrahnwskbd*) 362b138878dSdrahn M wskbd$U c 61 $U 600 363b138878dSdrahn ;; 364b138878dSdrahn 365b138878dSdrahntty[C-J]*) 366b138878dSdrahn U=${i##tty[C-J]} 367b138878dSdrahn case $i in 368b138878dSdrahn ttyC*) n=C m=0;; 369b138878dSdrahn ttyD*) n=D m=256;; 370b138878dSdrahn ttyE*) n=E m=512;; 371b138878dSdrahn ttyF*) n=F m=768;; 372b138878dSdrahn ttyG*) n=G m=1024;; 373b138878dSdrahn ttyH*) n=H m=1280;; 374b138878dSdrahn ttyI*) n=I m=1536;; 375b138878dSdrahn ttyJ*) n=J m=1792;; 376b138878dSdrahn esac 377b138878dSdrahn case $U in 378b138878dSdrahn [0-9a-f]) M tty$n$U c 60 $((16#$U+$m)) 600;; 379b138878dSdrahn cfg) M tty${n}cfg c 60 $((255+$m)) 600;; 380b138878dSdrahn *) echo bad unit $U for $i; exit 1;; 381b138878dSdrahn esac 382b138878dSdrahn ;; 383b138878dSdrahn 384b138878dSdrahnwscons) 385b138878dSdrahn R wsmouse0 wsmouse1 wsmouse2 wsmouse3 wskbd0 wskbd1 wskbd2 386b138878dSdrahn R wskbd3 wsmux ttyCcfg ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 387b138878dSdrahn R ttyC6 ttyC7 ttyC8 ttyC9 ttyCa ttyCb 388b138878dSdrahn ;; 389b138878dSdrahn 390b138878dSdrahnpty*) 391b138878dSdrahn if [ $U -gt 15 ]; then 392b138878dSdrahn echo bad unit for pty in: $i 393b138878dSdrahn continue 394b138878dSdrahn fi 395b138878dSdrahn set -A letters p q r s t u v w x y z P Q R S T 396b138878dSdrahn set -A suffixes 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q \ 397b138878dSdrahn r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X \ 398b138878dSdrahn Y Z 399b138878dSdrahn 400b138878dSdrahn name=${letters[$U]} 401b138878dSdrahn n=0 402b138878dSdrahn while [ $n -lt 62 ] 403b138878dSdrahn do 404b138878dSdrahn nam=$name${suffixes[$n]} 405b138878dSdrahn off=$(($U*62)) 406b138878dSdrahn M tty$nam c 4 $(($off+$n)) 407b138878dSdrahn M pty$nam c 5 $(($off+$n)) 408b138878dSdrahn n=$(($n+1)) 409b138878dSdrahn done 410b138878dSdrahn ;; 411b138878dSdrahn 412b138878dSdrahnptm) 413b138878dSdrahn M ptm c 98 0 666 414b138878dSdrahn ;; 415b138878dSdrahn 4160396b47eSmiodttya) 41722170e79Stodd M ttya c 11 0 660 dialer uucp 418b138878dSdrahn ;; 419b138878dSdrahn 420b138878dSdrahnst*) 421b138878dSdrahn n=$(($U*16)) 422b138878dSdrahn for pre in " " n e en 423b138878dSdrahn do 424b138878dSdrahn M ${pre}st$U b 25 $n 660 operator 425b138878dSdrahn M ${pre}rst$U c 25 $n 660 operator 426b138878dSdrahn n=$(($n+1)) 427b138878dSdrahn done 428b138878dSdrahn ;; 429b138878dSdrahn 430b138878dSdrahnvnd*) 431b138878dSdrahn dodisk vnd $U 19 19 $U 0 432b138878dSdrahn dodisk svnd $U 19 19 $U 2048 433b138878dSdrahn ;; 434b138878dSdrahn 435b138878dSdrahnrd*) 436b138878dSdrahn dodisk2 rd $U 18 18 $U 0 437b138878dSdrahn ;; 438b138878dSdrahn 439b138878dSdrahnch*) 440b138878dSdrahn M ch$U c 27 $U 660 operator 441b138878dSdrahn ;; 442b138878dSdrahn 443b138878dSdrahncd*) 444b138878dSdrahn dodisk2 cd $U 26 26 $U 0 445b138878dSdrahn ;; 446b138878dSdrahn 447b138878dSdrahnlocal) 448b138878dSdrahn test -s $T.local && sh $T.local 449b138878dSdrahn ;; 450b138878dSdrahn 451b138878dSdrahnall) 452b138878dSdrahn R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 453*80556d8aStodd R cd0 cd1 rd0 tun0 tun1 tun2 tun3 bio bpf0 bpf1 bpf2 bpf3 bpf4 4540396b47eSmiod R bpf5 bpf6 bpf7 bpf8 bpf9 pty0 xfs0 ss0 ss1 ch0 ttya hotplug 45577cf0548Sdrahn R ptm local wscons pci0 pci1 pci2 pci3 uall radio0 audio0 uk0 45677cf0548Sdrahn R random lkm crypto pf systrace wd0 wd1 wd2 wd3 raid0 raid1 45777cf0548Sdrahn R raid2 raid3 std st0 st1 fd 458b138878dSdrahn ;; 459b138878dSdrahn 460b138878dSdrahnwd*|sd*|raid*|ccd*) 461b138878dSdrahn case $i in 462b138878dSdrahn wd*) dodisk wd $U 16 16 $U 0;; 463b138878dSdrahn sd*) dodisk sd $U 24 24 $U 0;; 464b138878dSdrahn raid*) dodisk raid $U 71 71 $U 0;; 465b138878dSdrahn ccd*) dodisk ccd $U 21 21 $U 0;; 466b138878dSdrahn esac 467b138878dSdrahn ;; 468b138878dSdrahn 469b138878dSdrahn*) 470b138878dSdrahn echo $i: unknown device 471b138878dSdrahn ;; 472b138878dSdrahnesac 473b138878dSdrahndone 474b138878dSdrahn} 475b138878dSdrahnR "$@" 476b138878dSdrahn{ 477b138878dSdrahnecho -n ${RMlist[*]} 478b138878dSdrahnecho -n ${mklist[*]} 479b138878dSdrahnecho -n ${MKlist[*]} 480b138878dSdrahnecho -n ${whlist[*]} 481b138878dSdrahnecho ${oplist[*]} 482b138878dSdrahn} | if [ "$eo" = "echo" ]; then 483b138878dSdrahn cat 484b138878dSdrahnelse 485b138878dSdrahn sh 486b138878dSdrahnfi 487