GNU Bash Shell for MPE/iX
Introduction
GNU Bash is the standard shell for Linux. HP CSY is currently investigating bash as a possible addition to some future release of MPE. The software on this page is provided as unsupported freeware.
Prerequisites
Bash has been tested on MPE/iX 6.0, 6.5, and 7.0.
Before compiling or running bash on your e3000, you must have previously downloaded and installed the Porting Wrappers from here. The compile-time dependency is on /POSIXC60/lib/libposix60.a, and the run-time dependency is on /POSIXC60/HPBIN/LIBCPXL.
Downloading
Choose either of the following methods for downloading bash from bash-2.04-mpe.tar.Z:
- Use GNU wget to download bash directly to your e3000 as a bytestream file named /tmp/bash-2.04-mpe.tar.Z.
- Use a web browser to download bash to your PC, and then use an ftp client or Samba connection to upload bash to your e3000 as a bytestream file named /tmp/bash-2.04-mpe.tar.Z.
Installing
- :HELLO MANAGER.SYS
- :XEQ SH.HPBIN.SYS -L
- mkdir /usr/contrib
- cd /usr/contrib
- tar xvfopz /tmp/bash-2.04.tar.Z
- chmod 755 /usr/contrib /usr/contrib/bin /usr/contrib/bin/bash
Contents
- bin/bash
- bin/bashbug
A script for reporting bugs back to the bash authors. Please do not
use this script; see the feedback section below.
- info/bash.info
GNU format documentation for bash.
- man/man1/bash.1
Man page format documentation for bash.
- man/man1/bashbug.1
Man page format documentation for bashbug.
- src/bash-2.04-mpe
Compiling
This bash distribution comes with pre-compiled binaries which are ready to run. But if you want to compile it yourself, you must have previously installed GNU gcc, and then perform the following steps:
- :HELLO MANAGER.SYS
- :XEQ SH.HPBIN.SYS -L
- cd /usr/contrib/src/bash-2.04-mpe
- ./configure.mpe
- make
- make tests (optional)
- make install
Bash was easy to port to MPE. You can view the source code diffs here.
Running
To start bash from the MPE CI:
:XEQ /usr/contrib/bin/bash
or
:XEQ /usr/contrib/bin/bash --login
Differences
The bash shell differs from the SH.HPBIN.SYS shell in the following areas:
- Aliases are not exportable to subshells, and so the alias -x commands in the /etc/profile shipped by HP will result in errors.
- Bash does not initialize the TERM environment variable in a way compatible with the current /etc/profile. To work around this, do :SETVAR TERM 'hp2392a' before starting the bash shell.
- Bash does not recognize the -L parameter used by SH.HPBIN.SYS to indicate a login shell. Bash uses --login instead.
Testing
The most thorough and complete testing of bash can be obtained by altering the /bin/sh symbolic link to point to bash instead of /SYS/HPBIN/SH. This way, all existing scripts that refer to /bin/sh will be using bash. Please be aware that due to the differences listed above, this may not be a desirable thing to do on a heavily used production machine.
Perform the following steps to alter the /bin/sh symbolic link to point to bash:
- :HELLO MANAGER.SYS
- :XEQ SH.HPBIN.SYS -L
- cd /bin
- mv sh sh.save
- ln -s /usr/contrib/bin/bash sh
To restore the original environment:
- :HELLO MANAGER.SYS
- :XEQ SH.HPBIN.SYS -L
- cd /bin
- rm sh
- mv sh.save sh
Last updated March 30, 2001
|