#!/usr/bin/sh # May, 1996 File name = "ik_mknod" # Requires one argument, the slot number 1, 2, or 3 # # Developed for use with HP-UX 10.10 / "converged I/O", this script # finds the major number assigned by the kernel for the ik3x0, # calculates its minor number, then creates the device special # file using that data. # First check argument case "$1" in [1-3] ) # 1. Good slot number, regenerate ioconfig file with new device ioinit -c # 2. Get major number export major major=` lsdev -h -d ik3${1}0 | awk '{ print $1 }' ` echo major number is $major # 2. make the node (( num = $1 - 1)) export instance instance=` ioscan -f | grep ik3${1}0 | awk '{print $2 }' ` echo instance number is $instance echo if [ "$instance" -gt 1 ] then echo cmd: /usr/sbin/mknod /dev/ihcp${num} c $major 0x0${instance}${num}000 echo /usr/sbin/mknod /dev/ihcp${num} c $major 0x0${instance}${num}000 # make the ikon device files read/write chmod 666 /dev/ihcp* echo checking /dev for all ik3X0 device files: echo ls -al /dev/ihcp* else echo Bad instance number, check ioscan -f for problems. echo Make sure "eisa_config" has correct configuration. echo Device file not created! echo fi;; *) # if entry not 1, 2, or 3 echo echo Command Error - Needs argument 1, 2, or 3 for slot echo ;; esac