#!/bin/sh # # Script to create the require device files in /dev # Copyright (C) 1997-2000 SpellCaster Telecommunications # $Id: mkbdev,v 1.1 2004/03/11 03:59:30 bcrl Exp $ # Released under the GNU Public License. See LICENSE file for details. i=0 while [ $i -lt 8 ] do if [ ! -c /dev/isdn$i ] ; then mknod /dev/isdn$i c 45 $i || exit 1 fi i=$[i+1] done chown nobody.users /dev/isdn* || exit 1 redhat_release="" if [ -f /etc/redhat-release ] ; then redhat_release=`cat /etc/redhat-release | cut -f2 -d"(" | cut -f1 -d")"` fi if [ $redhat_release ] ; then if [ $redhat_release = "Guinness" -o "$redhat_release" = "Seawolf" ] ; then # RedHat 7.X - MAKEDEV is completely different. current_dir=`pwd` cd /dev; ./MAKEDEV isdn cd $pwd elif [ -f /dev/MAKEDEV ] ; then # Older RedHat... current_dir=`pwd` cd /dev /dev/MAKEDEV isdnbri cd $current_dir fi elif [ -f /dev/MAKEDEV ] ; then current_dir=`pwd` cd /dev /dev/MAKEDEV isdnbri cd $current_dir fi echo "Making devices in /dev/{bab,bppp}... please be patient." i=0 while [ $i -lt 64 ] do rm -f /dev/bab$i /dev/bppp$i || exit 1 mknod /dev/bab$i c 60 $i || exit 1 mknod /dev/bppp$i c 62 $i || exit 1 chown root.root /dev/bab$i /dev/bppp$i || exit 1 chmod 660 /dev/bab$i /dev/bppp$i || exit 1 i=$[i+1] done echo "done."