#!/bin/sh - # # Copyright (c) 1991 The Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the University of # California, Berkeley and its contributors. # 4. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # @(#)MAKEDEV.local 5.1 (Berkeley) 3/22/91 # # altq device MAKEDEV script. PATH=/sbin:/bin:/usr/bin:/usr/sbin umask 77 devpath=/dev # # altq uses character device major number 96 (defined in sys/net/altq_conf.c). # minors assigned as follows: # 0:(reserved) 1:cbq 2:wfq 3:afmap 4:fifoq 5:red 6:rio 7:localq 8:hfsc # 9:cdnr # osname=`uname -s` case ${osname} in FreeBSD) altqchr=96 ;; NetBSD) altqchr=65 ;; *) echo "${osname} : unknown os type!" exit 1 ;; esac if [ $# = 0 ] ; then echo "MAKEDEV.altq: no argument is specified!" echo " use \"MAKEDEV.altq all\" to create all the altq devices" fi for i do case $i in all|altq) sh MAKEDEV.altq cbq sh MAKEDEV.altq wfq sh MAKEDEV.altq afmap sh MAKEDEV.altq fifoq sh MAKEDEV.altq red sh MAKEDEV.altq rio sh MAKEDEV.altq localq sh MAKEDEV.altq hfsc sh MAKEDEV.altq cdnr sh MAKEDEV.altq blue ;; cbq) rm -f ${devpath}/cbq mknod ${devpath}/cbq c $altqchr 1 chown root.wheel ${devpath}/cbq chmod 644 ${devpath}/cbq ;; wfq) rm -f ${devpath}/wfq mknod ${devpath}/wfq c $altqchr 2 chown root.wheel ${devpath}/wfq chmod 644 ${devpath}/wfq ;; afmap) rm -f ${devpath}/afmap mknod ${devpath}/afmap c $altqchr 3 chown root.wheel ${devpath}/afmap chmod 644 ${devpath}/afmap ;; fifoq) rm -f ${devpath}/fifoq mknod ${devpath}/fifoq c $altqchr 4 chown root.wheel ${devpath}/fifoq chmod 644 ${devpath}/fifoq ;; red) rm -f ${devpath}/red mknod ${devpath}/red c $altqchr 5 chown root.wheel ${devpath}/red chmod 644 ${devpath}/red ;; rio) rm -f ${devpath}/rio mknod ${devpath}/rio c $altqchr 6 chown root.wheel ${devpath}/rio chmod 644 ${devpath}/rio ;; localq) rm -f ${devpath}/localq mknod ${devpath}/localq c $altqchr 7 chown root.wheel ${devpath}/localq chmod 644 ${devpath}/localq ;; hfsc) rm -f ${devpath}/hfsc mknod ${devpath}/hfsc c $altqchr 8 chown root.wheel ${devpath}/hfsc chmod 644 ${devpath}/hfsc ;; cdnr) rm -f ${devpath}/cdnr mknod ${devpath}/cdnr c $altqchr 9 chown root.wheel ${devpath}/cdnr chmod 644 ${devpath}/cdnr ;; blue) rm -f ${devpath}/blue mknod ${devpath}/blue c $altqchr 10 chown root.wheel ${devpath}/blue chmod 644 ${devpath}/blue ;; *) echo 'MAKEDEV.altq: no such device!' ;; esac done