HPlogo Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00): HP 3000 MPE/iX Computer Systems > Chapter 3 System Management

MPE/iX POSIX Installation Changes

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

by Jeff Vance Commercial Systems Division

MPE/iX Release 6.0 has fixed several POSIX install problems as well as adding a few POSIX enhancements. On 6.0, the System Manager should notice that:

  • POSIX files have the correct permissions so that all users can run the shell.

  • Several new symbolic links are created.

  • The original /etc/profile is saved.

  • A new file, /etc/profile.local, is defined.

  • The "SH" UDC runs the shell without changing the current working directory.

Three files were changed to accomplish these improvements:

  • I0036431.USL.SYS—the install job for most POSIX files.

  • /etc/profile—the shell's environment initialization script.

  • HPPXUDC.PUB.SYS—the system POSIX UDC file.

For the POSIX programmer, all archive libraries are copied and converted to shared libraries.

File Permissions

The POSIX installation job establishes the permissions on many files in the POSIX namespace. Prior to Release 6.0, this job caused file permissions to be set such that only users with SM capability could access the POSIX- named files. For example, the shell tries to execute the /etc/profile file; however, in earlier MPE releases, /etc/profile was installed with security that denied execute access to all non-privileged users. This caused the initialization environments to be skipped when the shell was run, and forced system managers to alter the security on many POSIX-related files.

In 6.0, I0036431 installs files with the correct permissions:

  • All users have read access to all text files, like /etc/motd, and /usr/lib/terminfo/hp2392a

  • All users have execute access to initialization files, like /etc/profile

  • All users have traverse permission (execute access in UNIX terms) to directories commonly used by the shell

Of course the system manager can change the file permissions but the default is now correct.

New Symbolic Links:

UNIX users are accustomed to invoking FTP and other networking services and files by their common UNIX filenames. To this end, Release 6.0 has added many new symbolic links. Twelve networking related links are defined:

POSIX FilenameMPE Filename
/bin/ftpFTP.ARPA.SYS
/bin/telnetTELNET.ARPA.SYS
/etc/protocolsPROTOCOL.NET.SYS
/etc/inetdINETD.NET.SYS
/etc/inetd.confINETDCNF.NET.SYS
/usr/adm/inetd.secINETDSEC.NET.SYS
/etc/bootpdBOOTPD.SYS
/etc/bootptabBOOTPTAB.NET.SYS
/etc/resolv.confRESLVCNF.NET.SYS
/etc/servicesSERVICES.NET.SYS
/etc/hostsHOSTS.NET.SYS
/usr/bin/remshREMSH.NET.SYS

And, several miscellaneous links:

   /bin/ksh
/bin/cc
/bin/ld

Three new device files have been created:

   /dev/null
/dev/tape
/dev/tty

There are traditional MPE ways of reaching all of the above files and services, but these new links make it more familiar to UNIX-trained system managers, without any changes visible to the MPE system administrator.

These new links and device files are defined in the I0036431.HP36431.SUPPORT job file. If a file by the same name already exists it will not be overwritten in this job.

Shell initialization:

/etc/profile is invoked by the POSIX shell whenever the -L info string is supplied, assuming the user running the shell has execute permission to this file. /etc/profile contains global initialization for the shell; whereas, user-specific initialization is accomplished via the user's own .profile file.

The main enhancement is that /etc/profile supports the execution of a custom initialization file named /etc/profile.local. If this file exists it is executed as the final step in /etc/profile. This allows sites to override the behavior of ./etc/profile, thus impacting all POSIX shell users, but managed in a central location. /etc/profile.local will never be modified by POSIX installs or updates. Also, if /etc/profile exists at POSIX install time, meaning at the time that I0036431.HP36431.SUPPORT is streamed, it will be renamed to /etc/profile.bak prior to the creation of this HP supplied version of /etc/profile. This allows you one on-line backup copy of this important shell initialization file.

Additional /etc/profile enhancements:

  • All shell variables defined in /etc/profile will default to a CI variable of the same name if one exists. This lets you initialize certain shell variables via LOGON UDCs. The one exception is the PATH shell variable since it is created within the shell program itself prior to the execution of /etc/profile. This prevents detection of a previous PATH variable.

  • The MANPATH variable is defined as "/usr/local/man:/usr/man:" if it has not been previously defined.

  • The PATH variable is set to "/usr/local/bin:/bin". Specifically, dot (".") has been removed from PATH. This implies that users will need to prefix their local scripts and programs filenames with "./" to execute them.

  • The HISTFILE variable, which defines the location of the shell's history file, is defined to be "/your account/your group/.sh_history" if it is not previously defined. If the user does not have a HOME group then their current group name is used; otherwise their HOME group name is used.

  • The TERM variable is defined to be "hp2392a" unless it has been defined previously in the CI. If you have defined TERM in the CI as a qualified file name this will not likely work in the shell. You may need to re-define TERM in your own .profile file or in the system's /etc/profile.local file.

  • The HOME variable is defined as "/your account/your group" as long as it has not been defined previously in the CI. If the user does not have a home group then their logon group name is used; otherwise their home group name is used.

  • The popular "ll" alias is defined as "ls -l".

  • The cursor is not homed and the screen is no longer cleared.

  • The current working directory (CWD) is not altered (see also the SH UDC changes).

The above changes in /etc/profile should make the shell more user-friendly.

"SH" UDC:

The HPPXUDC.PUB.SYS file contains the "SH" UDC, among other useful POSIX-related UDCs. This UDC file has been in FOS since Release 5.0 but is not cataloged by default. The "SH" UDC has been modified in Release 6.0.

Assuming that an SH command from the CI invokes the SH UDC described here, the shell can be invoked from the CI in a more UNIX-like manner as:

:sh -c makefile_6.0

which runs the shell (SH.HPBIN.SYS) passing it the name (in POSIX syntax) of a file to execute. In this case the filename passed to the shell is "makefile_6.0" in the current working directory (CWD) and in lowercase.

This is because the "SH" UDC has been simplified to accept any number of parameters and to no longer change the CWD. In prior MPE releases, the SH UDC changed the CWD to the user's home group in order to keep the shell's history file in a single location for individual users. Now the history file is defined by the HISTFILE shell variable, which is defined in /etc/profile.

Users that depended on the SH UDC to change the CWD to their home group will need to issue the shell's "cd" command to establish the CWD in the desired location. For example, to change the CWD to the users' home group the following command can be executed directly from the shell or via the .profile file:

cd /$HPACCOUNT/$HPHGROUP

This assumes that the user has a home group assigned. See the contents of /etc/profile on how to handle cases where a home group is not defined.

UNIX Porting

Existing archive library (".a") files residing in /lib or /usr/lib are converted to shared library (".sl") files, leaving the original ".a" files intact. This conversion is done in the I0036431.HP36431.SUPPORT job which is streamed during the update process. The shared library concept is familiar to MPE developers but relatively new in UNIX. The existence of shared libraries helps facilitate most modern UNIX ports.

Feedback to webmaster