|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3780 (0xec4) Types: TextFile Notes: UNIX file Names: »insdriver«
└─⟦69f23ffa1⟧ Bits:30004042/kconfig2.imd SW95705I 386/ix Multi-user Release 1.2 └─⟦69f23ffa1⟧ UNIX Filesystem └─⟦this⟧ »kc/new/etc/insdriver«
# # Copyrighted as an unpublished work. # (c) Copyright 1987 INTERACTIVE Systems Corporation # All rights reserved. # # RESTRICTED RIGHTS # # These programs are supplied under a license. They may be used, # disclosed, and/or copied only as permitted under such license # agreement. Any copy must contain the above copyright notice and # this restricted rights notice. Use, copying, and/or disclosure # of the programs is strictly prohibited unless otherwise provided # in the license agreement. # #ident "@(#)insdriver.sh 1.3 - 88/07/18" USAGE="insdriver [ -n drivername ] [ -d driver directory ] [ -c confdir ]" for f do case "$f" in -c) CONF=$2 shift;shift;; -d) drvdir=$2 shift;shift;; -n) name=$2; shift;shift;; -h|help) echo "$USAGE"; exit 0;; esac done resp="" if [ -z "$driver" ] then while [ -z "$drvdir" ] do echo Directory Containing Driver Files:" \c" read resp if [ -d "$resp" ] then drvdir=$resp else echo $resp not a directory fi done while [ -z "$name" ] do echo Driver Name \(same name as .o file\):" \c" read resp [ -z "$resp" ] && continue if expr "$resp" : '.*\.o' then resp=`basename $resp .o` fi if [ -r $drvdir/$resp.o ] then name=$resp else echo No $resp.o file in directory $drvdir fi done fi while [ -z "$CONF" ] do echo Configuration Directory \(/etc/atconf\):" \c" read resp case "$resp" in "") CONF=/etc/atconf;; *) if [ -d $resp ] then CONF=$resp else echo $resp not a directory fi;; esac done if [ ! -d $CONF/modules ] then if mkdir $CONF/modules then : else echo Unable to create directory $CONF/modules exit 1 fi fi if [ -z "$driver" ] then if [ -d $CONF/modules/$name ] then more=1 while [ "$more" -gt 0 ] do echo Directory $CONF/modules/$name exists. Replace with new modules\[y, n]": \c" read resp case "$resp" in n|N) more=0; nochange="N";; y|Y) more=0; nochange="";; *) ;; esac done else if mkdir $CONF/modules/$name then : else echo Unable to create directory $CONF/modules/$name exit 1 fi fi # # Move driver files to modules directory # if [ -z "$nochange" ] then for file in $name.o stubs.c space.c config do [ -r $drvdir/$file ] && cp $drvdir/$file $CONF/modules/$name/$file done fi # # Get the major device numbers from the config file # cmaj=- bmaj=- if [ -r $CONF/modules/$name/config ] then cmaj=`fgrep character\( $CONF/modules/$name/config` if [ $? -eq 0 ] then cmaj=`echo $cmaj| tr -s '()' " "` set $cmaj cmaj=$2 ischar=1 else cmaj=0 ischar=0 fi bmaj=`fgrep block\( $CONF/modules/$name/config` if [ $? -eq 0 ] then bmaj=`echo $bmaj| tr -s '()' " "` set $bmaj bmaj=$2 isblk=1 else bmaj=0 isblk=0 fi fi # # Get the driver description while [ -z "$desc" ] do echo Enter a one line driver description: read resp [ -z "$resp" ] && continue desc="$resp" done # # Get the /dev entry name # #while [ -z "$dname" ] #do # echo /dev Entry Name:" \c" # read resp # [ -z "$resp" ] && continue # dname="$resp" #done dname="$name" # # Update the description file # TAB=`echo '\t\c'` if grep "^$name " $CONF/modules/description >/dev/null then cat <<! | ed - $CONF/modules/description /^$name /c $name${TAB}$bmaj${TAB}$cmaj${TAB}io${TAB}$dname${TAB}${TAB}$desc . w q ! else cat <<! >>$CONF/modules/description $name${TAB}$bmaj${TAB}$cmaj${TAB}io${TAB}$dname${TAB}${TAB}$desc ! fi fi MORECPP="-DAT386" ; export MORECPP resp="" while [ -z "$resp" ] do echo Do you want to Configure\/Build a Kernel \[ y, n \]": \c" read resp case "$resp" in y|Y) CONF=$CONF /etc/kconfig -c $CONF ;; n|N) ;; *) resp="" esac done