Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

621 lines
12 KiB

20 years ago
7 years ago
14 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
8 years ago
20 years ago
20 years ago
20 years ago
13 years ago
20 years ago
20 years ago
20 years ago
20 years ago
13 years ago
20 years ago
20 years ago
4 years ago
20 years ago
20 years ago
20 years ago
20 years ago
19 years ago
20 years ago
4 years ago
13 years ago
15 years ago
18 years ago
11 years ago
15 years ago
20 years ago
8 years ago
17 years ago
5 years ago
17 years ago
20 years ago
13 years ago
20 years ago
13 years ago
20 years ago
20 years ago
20 years ago
20 years ago
15 years ago
8 years ago
15 years ago
8 years ago
7 years ago
20 years ago
19 years ago
20 years ago
18 years ago
18 years ago
20 years ago
18 years ago
20 years ago
20 years ago
18 years ago
20 years ago
11 years ago
20 years ago
18 years ago
11 years ago
18 years ago
11 years ago
18 years ago
11 years ago
20 years ago
10 years ago
20 years ago
7 years ago
20 years ago
7 years ago
8 years ago
15 years ago
8 years ago
8 years ago
8 years ago
16 years ago
7 years ago
16 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
13 years ago
4 years ago
13 years ago
20 years ago
6 years ago
20 years ago
20 years ago
7 years ago
18 years ago
20 years ago
13 years ago
20 years ago
17 years ago
17 years ago
20 years ago
5 years ago
17 years ago
8 years ago
20 years ago
15 years ago
11 years ago
20 years ago
18 years ago
20 years ago
18 years ago
20 years ago
15 years ago
10 years ago
5 years ago
15 years ago
13 years ago
4 years ago
20 years ago
20 years ago
20 years ago
19 years ago
20 years ago
4 years ago
20 years ago
19 years ago
20 years ago
4 years ago
20 years ago
4 years ago
20 years ago
4 years ago
20 years ago
4 years ago
20 years ago
20 years ago
19 years ago
20 years ago
4 years ago
20 years ago
13 years ago
10 years ago
4 years ago
13 years ago
20 years ago
7 years ago
20 years ago
14 years ago
20 years ago
14 years ago
20 years ago
13 years ago
5 years ago
13 years ago
20 years ago
20 years ago
19 years ago
20 years ago
20 years ago
20 years ago
20 years ago
20 years ago
8 years ago
7 years ago
8 years ago
20 years ago
7 years ago
20 years ago
20 years ago
20 years ago
20 years ago
17 years ago
20 years ago
17 years ago
20 years ago
20 years ago
20 years ago
7 years ago
6 years ago
12 years ago
12 years ago
20 years ago
18 years ago
7 years ago
20 years ago
18 years ago
20 years ago
  1. #!/bin/sh -
  2. #
  3. # THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
  4. # generated from:
  5. #
  6. # OpenBSD: etc.amd64/MAKEDEV.md,v 1.74 2020/01/23 02:47:28 dlg Exp
  7. # OpenBSD: MAKEDEV.common,v 1.110 2020/04/18 21:28:35 ratchov Exp
  8. # OpenBSD: MAKEDEV.mi,v 1.83 2016/09/11 03:06:31 deraadt Exp
  9. # OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp
  10. #
  11. #
  12. # Copyright (c) 2001-2004 Todd T. Fries <todd@OpenBSD.org>
  13. #
  14. # Permission to use, copy, modify, and distribute this software for any
  15. # purpose with or without fee is hereby granted, provided that the above
  16. # copyright notice and this permission notice appear in all copies.
  17. #
  18. # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  19. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  20. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  21. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  22. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  23. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  24. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  25. #
  26. # Device "make" file. Valid arguments:
  27. # all makes all known devices, including local devices.
  28. # Tries to make the ``standard'' number of each type.
  29. # ramdisk Ramdisk kernel devices
  30. # std Standard devices
  31. # local Configuration specific devices
  32. # Disks:
  33. # cd* ATAPI and SCSI CD-ROM drives
  34. # fd* Floppy disk drives (3 1/2", 5 1/4")
  35. # rd* "rd" pseudo-disks
  36. # sd* SCSI disks, including flopticals
  37. # vnd* "file" pseudo-disk devices
  38. # wd* "winchester" disk drives (ST506, IDE, ESDI, RLL, ...)
  39. # Tapes:
  40. # ch* SCSI media changers
  41. # st* SCSI tape drives
  42. # Terminal ports:
  43. # tty[0-7][0-9a-f] NS16x50 serial ports
  44. # ttyc* Cyclades serial ports
  45. # ttyVI* Virtio serial ports
  46. # Pseudo terminals:
  47. # ptm pty master device
  48. # pty* Set of 62 master pseudo terminals
  49. # tty* Set of 62 slave pseudo terminals
  50. # Console ports:
  51. # ttyC-J* wscons display devices
  52. # wscons Minimal wscons devices
  53. # wskbd* wscons keyboards
  54. # wsmux wscons keyboard/mouse mux devices
  55. # Pointing devices:
  56. # wsmouse* wscons mice
  57. # Printers:
  58. # lpa* Polled printer port
  59. # lpt* IEEE 1284 centronics printer
  60. # USB devices:
  61. # ttyU* USB serial ports
  62. # uall All USB devices
  63. # ugen* Generic USB devices
  64. # uhid* Generic HID devices
  65. # fido fido/* nodes
  66. # ulpt* Printer devices
  67. # usb* Bus control devices used by usbd for attach/detach
  68. # Special purpose devices:
  69. # apm Power Management Interface
  70. # audio* Audio devices
  71. # bio ioctl tunnel pseudo-device
  72. # bktr* Video frame grabbers
  73. # bpf Berkeley Packet Filter
  74. # dt Dynamic Tracer
  75. # diskmap Disk mapper
  76. # drm* Direct Rendering Manager
  77. # fd fd/* nodes
  78. # fuse Userland Filesystem
  79. # gpio* General Purpose Input/Output
  80. # hotplug devices hot plugging
  81. # ipmi* IPMI BMC access
  82. # nvram NVRAM access
  83. # kcov Kernel code coverage tracing
  84. # pci* PCI bus devices
  85. # pctr* PC Performance Tuning Register access device
  86. # pf* Packet Filter
  87. # pppx* PPP Multiplexer
  88. # pppac* PPP Access Concentrator
  89. # radio* FM tuner devices
  90. # *random In-kernel random data source
  91. # rmidi* Raw MIDI devices
  92. # speaker PC speaker
  93. # tun* Network tunnel driver
  94. # tap* Ethernet tunnel driver
  95. # tuner* Tuner devices
  96. # uk* Unknown SCSI devices
  97. # video* Video V4L2 devices
  98. # vmm Virtual Machine Monitor
  99. # vscsi* Virtual SCSI controller
  100. # pvbus* paravirtual device tree root
  101. # switch* Switch driver
  102. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  103. T=$0
  104. # set this to echo for Echo-Only debugging
  105. [ "$eo" ] || eo=
  106. hex()
  107. {
  108. case $1 in
  109. [0-9]) echo -n $1;;
  110. 10) echo -n a;;
  111. 11) echo -n b;;
  112. 12) echo -n c;;
  113. 13) echo -n d;;
  114. 14) echo -n e;;
  115. 15) echo -n f;;
  116. esac
  117. }
  118. alph2d()
  119. {
  120. local t="$1"
  121. local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  122. local sub=${p%${t}*}
  123. echo ${#sub}
  124. }
  125. h2d()
  126. {
  127. local s="$1"
  128. local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*}
  129. echo $(($(_h2d $f)*16+ $(_h2d $n) ))
  130. }
  131. _h2d()
  132. {
  133. case $1 in
  134. [0-9]) echo -n $1;;
  135. a) echo -n 10;;
  136. b) echo -n 11;;
  137. c) echo -n 12;;
  138. d) echo -n 13;;
  139. e) echo -n 14;;
  140. f) echo -n 15;;
  141. esac
  142. }
  143. unt()
  144. {
  145. # XXX pdksh can't seem to deal with locally scoped variables
  146. # in ${foo#$bar} expansions
  147. arg="$1"
  148. tmp="${arg#[a-zA-Z]*}"
  149. tmp="${tmp%*[a-zA-Z]}"
  150. while [ "$tmp" != "$arg" ]
  151. do
  152. arg=$tmp
  153. tmp="${arg#[a-zA-Z]*}"
  154. tmp="${tmp%*[a-zA-Z]}"
  155. done
  156. echo $arg
  157. }
  158. dodisk()
  159. {
  160. [ "$DEBUG" ] && set -x
  161. n=$(($((${5}*${7:-16}))+${6})) count=0
  162. [ 0$7 -ne 8 ] && l="i j k l m n o p"
  163. for d in a b c d e f g h $l
  164. do
  165. M $1$2$d b $3 $(($n+$count)) 640 operator
  166. M r$1$2$d c $4 $(($n+$count)) 640 operator
  167. let count=count+1
  168. done
  169. }
  170. dodisk2()
  171. {
  172. n=$(($(($5*${7:-16}))+$6))
  173. M $1$2a b $3 $n 640 operator
  174. M r$1$2a c $4 $n 640 operator
  175. n=$(($n+2))
  176. M $1$2c b $3 $n 640 operator
  177. M r$1$2c c $4 $n 640 operator
  178. }
  179. # M name b/c major minor [mode] [group]
  180. RMlist[0]="rm -f"
  181. mkl() {
  182. : ${mklist[0]:=";mknod"}
  183. mklist[${#mklist[*]}]=" -m $1 $2 $3 $4 $5"
  184. }
  185. M() {
  186. RMlist[${#RMlist[*]}]=$1
  187. mkl ${5-666} $1 $2 $3 $4
  188. G=${6:-wheel}
  189. [ "$7" ] && {
  190. MKlist[${#MKlist[*]}]="&& chown $7:$G $1"
  191. } || {
  192. case $G in
  193. wheel)
  194. [ ${#whlist[*]} = 0 ] && whlist[0]="&& chgrp wheel"
  195. whlist[${#whlist[*]}]="$1"
  196. ;;
  197. operator)
  198. [ ${#oplist[*]} = 0 ] && oplist[0]="&& chgrp operator"
  199. oplist[${#oplist[*]}]="$1"
  200. ;;
  201. *)
  202. MKlist[${#MKlist[*]}]="&& chgrp $G $1";
  203. esac
  204. }
  205. return 0
  206. }
  207. R() {
  208. [ "$DEBUG" ] && set -x
  209. for i in "$@"
  210. do
  211. U=`unt $i`
  212. [ "$U" ] || U=0
  213. case $i in
  214. ramdisk)
  215. R std bpf fd0 wd0 sd0 tty00 tty01 rd0 bio diskmap
  216. R st0 cd0 ttyC0 wskbd0 wskbd1 wskbd2 random
  217. ;;
  218. std)
  219. M console c 0 0 600
  220. M tty c 1 0
  221. M mem c 2 0 640 kmem
  222. M kmem c 2 1 640 kmem
  223. M null c 2 2
  224. M zero c 2 12
  225. M stdin c 22 0
  226. M stdout c 22 1
  227. M stderr c 22 2
  228. M ksyms c 50 0 640 kmem
  229. M klog c 7 0 600
  230. M xf86 c 2 4 600
  231. ;;
  232. ttyc*)
  233. M ttyc$U c 38 $U 660 dialer root
  234. M cuac$U c 38 $(($U+128)) 660 dialer root
  235. ;;
  236. switch*)
  237. M switch$U c 97 $U 600
  238. ;;
  239. pvbus*)
  240. M pvbus$U c 95 $U 640
  241. ;;
  242. vscsi*)
  243. M vscsi$U c 89 $U 600
  244. ;;
  245. vmm)
  246. M vmm c 10 0 600
  247. ;;
  248. video*)
  249. M video$U c 44 $U 600
  250. MKlist[${#MKlist[*]}]=";[ -e video ] || ln -s video$U video"
  251. ;;
  252. uk*)
  253. M uk$U c 20 $U 640 operator
  254. ;;
  255. tuner*)
  256. M tuner$U c 49 $(($(($U*2))+16)) 644
  257. ;;
  258. tap*)
  259. M tap$U c 93 $U 600
  260. ;;
  261. tun*)
  262. M tun$U c 40 $U 600
  263. ;;
  264. speaker)
  265. M speaker c 27 0 600
  266. ;;
  267. rmidi*)
  268. M rmidi$U c 52 $U 660 _sndiop
  269. ;;
  270. *random)
  271. M urandom c 45 0 644
  272. RMlist[${#RMlist[*]}]=random
  273. MKlist[${#MKlist[*]}]=";ln -s urandom random"
  274. ;;
  275. radio*)
  276. M radio$U c 76 $U
  277. MKlist[${#MKlist[*]}]=";[ -e radio ] || ln -s radio$U radio"
  278. ;;
  279. pppac*)
  280. M pppac$U c 99 $U 600
  281. ;;
  282. pppx*)
  283. M pppx$U c 91 $U 600
  284. ;;
  285. pf*)
  286. M pf c 73 0 600
  287. ;;
  288. pctr)
  289. M pctr c 46 0 644
  290. ;;
  291. pci*)
  292. M pci$U c 72 $U 600
  293. MKlist[${#MKlist[*]}]=";[ -h pci ] || ln -sf pci0 pci"
  294. ;;
  295. kcov)
  296. M kcov c 19 0 600
  297. ;;
  298. nvram)
  299. M nvram c 85 0 440 kmem
  300. ;;
  301. ipmi*)
  302. M ipmi$U c 96 $U 600
  303. ;;
  304. hotplug)
  305. M hotplug c 82 $U 400
  306. ;;
  307. gpio*)
  308. M gpio$U c 88 $U 600
  309. ;;
  310. fuse)
  311. M fuse$U c 92 $U 600
  312. ;;
  313. fd)
  314. RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0
  315. while [ $n -lt 64 ];do M fd/$n c 22 $n;n=$(($n+1));done
  316. MKlist[${#MKlist[*]}]=";chmod 555 fd"
  317. ;;
  318. drm*)
  319. M drm$U c 87 $U 600
  320. r=$(($U+128))
  321. M drmR$r c 87 $r 600
  322. ;;
  323. diskmap)
  324. M diskmap c 90 0 640 operator
  325. ;;
  326. dt)
  327. M dt c 30 0 600
  328. ;;
  329. bpf)
  330. M bpf c 23 0 600
  331. M bpf0 c 23 0 600
  332. ;;
  333. bktr*)
  334. M bktr$U c 49 $U 644
  335. ;;
  336. bio)
  337. M bio c 79 0 600
  338. ;;
  339. audio*)
  340. M audio$U c 42 $U 660 _sndiop
  341. M audioctl$U c 42 $(($U+192)) 660 _sndiop
  342. ;;
  343. apm*)
  344. M apm c 83 0 644
  345. M apmctl c 83 8 644
  346. ;;
  347. usb*)
  348. [ "$i" = "usb" ] && u= || u=$U
  349. M usb$u c 61 $U 640
  350. ;;
  351. ulpt*)
  352. M ulpt$U c 64 $U 600
  353. ;;
  354. fido)
  355. RMlist[${#RMlist[*]}]=";mkdir -p fido;rm -f" n=0
  356. while [ $n -lt 4 ];do M fido/$n c 98 $n 666;n=$(($n+1));done
  357. MKlist[${#MKlist[*]}]=";chmod 555 fido"
  358. ;;
  359. uhid*)
  360. M uhid$U c 62 $U 600
  361. ;;
  362. ugen*)
  363. n=$(($U*16))
  364. for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5}
  365. do
  366. M ugen$U.$j c 63 $(($n+10#$j)) 600
  367. done
  368. ;;
  369. uall)
  370. R ttyU0 ttyU1 ttyU2 ttyU3 ugen0 ugen1 ugen2 ugen3 ugen4 ugen5
  371. R ugen6 ugen7 ulpt0 ulpt1 fido uhid0 uhid1 uhid2 uhid3 uhid4
  372. R uhid5 uhid6 uhid7 usb0 usb1 usb2 usb3 usb4 usb5 usb6 usb7
  373. ;;
  374. ttyU[0-9a-zA-Z])
  375. U=${i#ttyU*}
  376. o=$(alph2d $U)
  377. M ttyU$U c 66 $o 660 dialer root
  378. M cuaU$U c 66 $(($o+128)) 660 dialer root
  379. ;;
  380. lpt*|lpa*)
  381. case $i in
  382. lpt*) n=lpt f=0;;
  383. lpa*) n=lpa f=128;;
  384. esac
  385. M $n$U c 16 $(($U+$f)) 600
  386. ;;
  387. wsmouse[0-9]*)
  388. M wsmouse$U c 68 $U 600
  389. ;;
  390. wsmux|wsmouse|wskbd)
  391. M wsmouse c 69 0 600
  392. M wskbd c 69 1 600
  393. ;;
  394. wskbd[0-9]*)
  395. M wskbd$U c 67 $U 600
  396. ;;
  397. wscons)
  398. R wsmouse0 wsmouse1 wsmouse2 wsmouse3 wsmouse4 wsmouse5
  399. R wsmouse6 wsmouse7 wsmouse8 wsmouse9 wskbd0 wskbd1 wskbd2
  400. R wskbd3 wsmux ttyCcfg ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5
  401. R ttyC6 ttyC7 ttyC8 ttyC9 ttyCa ttyCb
  402. ;;
  403. tty[C-J]*)
  404. U=${i##tty[C-J]}
  405. case $i in
  406. ttyC*) n=C m=0;;
  407. ttyD*) n=D m=256;;
  408. ttyE*) n=E m=512;;
  409. ttyF*) n=F m=768;;
  410. ttyG*) n=G m=1024;;
  411. ttyH*) n=H m=1280;;
  412. ttyI*) n=I m=1536;;
  413. ttyJ*) n=J m=1792;;
  414. esac
  415. case $U in
  416. [0-9a-f]) M tty$n$U c 12 $((16#$U+$m)) 600;;
  417. cfg) M tty${n}cfg c 12 $((255+$m)) 600;;
  418. *) echo bad unit $U for $i; exit 1;;
  419. esac
  420. ;;
  421. pty*)
  422. if [ $U -gt 15 ]; then
  423. echo bad unit for pty in: $i
  424. continue
  425. fi
  426. set -A letters p q r s t u v w x y z P Q R S T
  427. 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 \
  428. 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 \
  429. Y Z
  430. name=${letters[$U]}
  431. n=0
  432. while [ $n -lt 62 ]
  433. do
  434. nam=$name${suffixes[$n]}
  435. off=$(($U*62))
  436. M tty$nam c 5 $(($off+$n))
  437. M pty$nam c 6 $(($off+$n))
  438. n=$(($n+1))
  439. done
  440. ;;
  441. ptm)
  442. M ptm c 81 0 666
  443. ;;
  444. ttyVI*)
  445. M ttyVI$U c 94 $U 660 dialer root
  446. ;;
  447. tty[0-7][0-9a-f])
  448. U=${i#tty*}
  449. o=$(h2d $U)
  450. M tty$U c 8 $o 660 dialer root
  451. M cua$U c 8 $(($o+128)) 660 dialer root
  452. ;;
  453. st*)
  454. n=$(($U*16))
  455. for pre in " " n e en
  456. do
  457. M ${pre}rst$U c 14 $n 660 operator
  458. n=$(($n+1))
  459. done
  460. ;;
  461. ch*)
  462. M ch$U c 17 $U 660 operator
  463. ;;
  464. vnd*)
  465. dodisk vnd $U 14 41 $U 0
  466. ;;
  467. rd*)
  468. dodisk2 rd $U 17 47 $U 0
  469. ;;
  470. fd*)
  471. typnam=$U${i#fd[01]*}
  472. case $typnam in
  473. 0|1) typnum=0;; # no type specified, assume A
  474. *A) typnum=0; typnam=0;;
  475. *B) typnum=1;;
  476. *C) typnum=2;;
  477. *D) typnum=3;;
  478. *E) typnum=4;;
  479. *F) typnum=5;;
  480. *G) typnum=6;;
  481. *H) typnum=7;;
  482. *) echo bad type $typnam for $i; exit 1;;
  483. esac
  484. case $U in
  485. 0|1) blk=2; chr=9;;
  486. *) echo bad unit $U for $i; exit 1;;
  487. esac
  488. nam=fd${typnam}
  489. n=$(($(($U*128))+$(($typnum*16))))
  490. M ${nam}a b $blk $n 640 operator
  491. M ${nam}b b $blk $(($n+1)) 640 operator
  492. M ${nam}c b $blk $(($n+2)) 640 operator
  493. M ${nam}i b $blk $(($n+8)) 640 operator
  494. M r${nam}a c $chr $n 640 operator
  495. M r${nam}b c $chr $(($n+1)) 640 operator
  496. M r${nam}c c $chr $(($n+2)) 640 operator
  497. M r${nam}i c $chr $(($n+8)) 640 operator
  498. ;;
  499. cd*)
  500. dodisk2 cd $U 6 15 $U 0
  501. ;;
  502. local)
  503. test -s $T.local && sh $T.local
  504. ;;
  505. all)
  506. R switch0 switch1 switch2 switch3 ipmi0 ttyVI00 ttyVI10
  507. R ttyVI20 ttyVI30 ttyVI40 drm0 drm1 drm2 drm3 nvram gpio0
  508. R gpio1 gpio2 bktr0 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4
  509. R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tap0 tap1 tap2 tap3 tun0
  510. R tun1 tun2 tun3 bio pty0 fd1 fd1B fd1C fd1D fd1E fd1F fd1G
  511. R fd1H fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H diskmap vscsi0
  512. R ch0 audio0 audio1 audio2 audio3 dt kcov bpf pvbus0 pvbus1
  513. R vmm fuse pppac pppx hotplug ptm local wscons pci0 pci1 pci2
  514. R pci3 uall rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6
  515. R rmidi7 tuner0 radio0 speaker video0 video1 uk0 random lpa0
  516. R lpa1 lpa2 lpt0 lpt1 lpt2 tty00 tty01 tty02 tty03 tty04 tty05
  517. R tty06 tty07 tty08 tty09 tty0a tty0b ttyc0 ttyc1 ttyc2 ttyc3
  518. R ttyc4 ttyc5 ttyc6 ttyc7 apm pf pctr wd0 wd1 wd2 wd3 std st0
  519. R st1 fd
  520. ;;
  521. wd*|sd*)
  522. case $i in
  523. wd*) dodisk wd $U 0 3 $U 0;;
  524. sd*) dodisk sd $U 4 13 $U 0;;
  525. esac
  526. ;;
  527. *)
  528. echo $i: unknown device
  529. ;;
  530. esac
  531. done
  532. }
  533. R "$@"
  534. {
  535. echo -n ${RMlist[*]}
  536. echo -n ${mklist[*]}
  537. echo -n ${MKlist[*]}
  538. echo -n ${whlist[*]}
  539. echo ${oplist[*]}
  540. } | if [ "$eo" = "echo" ]; then
  541. cat
  542. else
  543. sh
  544. fi