#!/usr/bin/sh # "ik_install" May 17, 1996 # This shell script will install ik310, ik320, or ik330 # depending on slot number, a required shell command argument. # A "0" argument will install a new kernel without ik3x0 install. # # It makes a new HP-UX 10.x kernel "/stand/build/vmunix_test". # Slot number will determine which ik3x0 will be compiled. # This shell script will be run once for each IKON EISA slot. # # This script will do the following: # 1. Copy !IKN1110.CFG config to /sbin/lib/eisa directory. # 2. Compile the ik3x0.c driver to its ik3x0.o object. # 3. Archive the object to the /usr/conf/lib directory. # 4. Add the ik3x0 driver to the /stand/system file. # 5. Copy the ik3x0 master file to /stand/build/master.d. # 6. Generate a new vmunix_test kernel under /stand/build. # 7. Copy the new kernel to /stand/vmunix. # First check for slot arguments 1, 2, or 3, or 0 for no IKON card. case "$1" in [1-3] ) # slot number, ik3x0 install. # 1. Copy the config file to /sbin/lib/eisa and link to # /etc/eisa/IKN1110.CFG for compatibility with other .CFG # "ln" will just give a warning if the file already exists. cp \!IKN1110.CFG /sbin/lib/eisa/\!IKN1110.CFG ln -s /sbin/lib/eisa/\!IKN1110.CFG /etc/eisa/IKN1110.CFG # 2. compile ik3x0.c driver to create the object file. /usr/bin/cc -c \ -D_hp9000s700 -Dhp9000s700 -Dhp9000s800 -D_hp9000s800 \ -DKERNEL -D_KERNEL -DKERNEL_BUILD -D_UNSUPPORTED -D_WSIO \ -I/usr/conf/io -I/usr/include/sys +Hx0 +XixduV +R25 +DA1.0 +DS1.0 \ ik3${1}0.c # 3. archive the object file to the proper library location. /usr/ccs/bin/ar -r /usr/conf/lib/libik3${1}0.a ik3${1}0.o # 4. add ik3x0 driver to the /stand/system file if not there. /sbin/chmod 666 /stand/system grep ik3${1}0 /stand/system > testik.tmp # if ik3x0 not there, add it. if [ ! -s testik.tmp ] then echo putting ik3${1}0 in /stand/system echo ik3${1}0 >> /stand/system echo fi /sbin/chmod 444 /stand/system rm testik.tmp # 5. Copy ikon3x0 master file to /usr/conf/master.d directory. cp ikon3${1}0 /usr/conf/master.d # 6. Make vmunix_test kernel in /stand/build. /usr/sbin/mk_kernel # 7. Save the present kernel, if not previously saved. # Then copy the new /stand/build/vmunix_test to /stand/vmunix. if [ ! -s /stand/vmunix.back ] then cp /stand/vmunix /stand/vmunix.back cp /stand/build/vmunix_test /stand/vmunix else cp /stand/build/vmunix_test /stand/vmunix fi echo echo ik3${1}0 DRIVER INSTALL COMPLETE. IF NO ERROR MESSAGES, echo run eisa_config to add or move the !IKN1110.CFG file, then echo reboot to install the new kernel. The previous or original echo kernel is stored as "/stand/vmunix.back". echo echo Then cd to /IKON and run "./ik_mknod $1". echo;; 0 ) # Make a new kernel without ik3x0 install. /usr/sbin/mk_kernel if [ ! -s /stand/vmunix.back ] then cp /stand/vmunix /stand/vmunix.back cp /stand/build/vmunix_test /stand/vmunix else cp /stand/build/vmunix_test /stand/vmunix fi echo echo MK_KERNEL COMPLETE. IF NO ERROR MESSAGES, echo run eisa_config to update the configuration, then echo reboot to install the new kernel. The previous or original echo kernel is stored as "/stand/vmunix.back". echo;; *) # Entry is not 0, nor slot 1, 2, or 3. echo echo ik_install: Error - Needs argument 1, 2, or 3 for slot, echo " or 0 to make a new kernel only." echo;; esac