As noted on the uname(1) manual page, the SCOMPAT environment variable can be used to set system name and version returned by the uname command. The chsysinfo command not only changes the values returned by the uname command, but also changes the system name and version returned by confstr(3C), sysinfo(2), and uname(2).
The changes made by chsysinfo are effective system wide; however, they do not persist across a reboot of the system. Upon reboot, the system will always have the default system name and version values specified in the file /etc/conf/pack.d/name/space.c.
option | system name | version |
---|---|---|
uw712 | UnixWare | 7.1.2 |
ou8 | OpenUNIX | 8.0.0 |
default | UnixWare | 7.1.3 |
To install such an application, you might need to enter a the following commands:
chsysinfo uw712 pkgadd -d cdrom1 uw7pkg chsysinfo default
The first chsysinfo command changes the system name and version to "UnixWare" and "7.1.2". After the package is installed with pkgadd, the second command returns these values to their default values.
Similarly, applications that require runtime checks of the system name and version can be started with a "wrapper" script that executes chsysinfo prior to launching the application, as in this example:
chsysinfo uw712 /usr/bin/myapplication chsysinfo default