Specifications
D
evice Driver Programming
14-16
Following is an example of a prototype file for a driver add-on package.
For more information, refer to the prototype(4) manual page.
postinstall 14
The following steps should be performed in a postinstall script to install a DSP:
1. Change directory to /tmp/xyzzy, where the DSP files were installed.
2. Execute idinstall -a and pass it the DSP name. This creates the
needed directories and moves the DSP contents to the appropriate loca-
tions. If the idinstall -a fails, the package was already installed.
3. If the DSP has already been installed, idinstall -u command is used
to update the package, using the files from the DSP.
NOTE
DSPs should always use the idinstall -P option. This way
all the files installed are recorded in the contents file.
4. Run the idbuild command without any options to create a new UNIX
system kernel when the system is rebooted.
5. removef any /tmp files installed.
i pkginfo
i postinstall
i preremove
!default 644 root sys
d none /tmp???
d none /tmp/xyzzy
#
# These files are installed by the idinstall command in the postinstall script
#
v none/tmp/xyzzy/Driver.o=/etc/conf/pack.d/xyzzy/Driver.o
v none/tmp/xyzzy/Space.c=/etc/conf/pack.d/xyzzy/space.c
v none/tmp/xyzzy/Master=/etc/conf/mdevice.d/xyzzy
v none/tmp/xyzzy/System=/etc/conf/sdevice.d/xyzzy
#
# These files are installed by the postinstall shell script
#
v none/tmp/loadmods=/newdrivers/xyzzy/loadmods
v none/tmp/xyzzy/disk.cfg=/etc/conf/pack.d/xyzzy/disk.cfg
#
# This file is installed by the pkgadd command
#
f none/usr/include/sys/xyzzy.h