Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Jazz home  >  Software

GNU bash shell for MPE/iX

» 

Jazz home

»

Software

»

Papers & Training

»

Java

»

HP Partners

»

News & Events

»

Register for more info

Content starts here
Last updated March 30, 2001

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 http://jazz.external.hp.com/src/px_wrappers/index.html. 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 http://jazz.external.hp.com/src/bash/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

  1. :HELLO MANAGER.SYS
  2. :XEQ SH.HPBIN.SYS -L
  3. mkdir /usr/contrib
  4. cd /usr/contrib
  5. tar xvfopz /tmp/bash-2.04.tar.Z
  6. chmod 755 /usr/contrib /usr/contrib/bin /usr/contrib/bin/bash

Contents

bin/bash
The bash shell NMPRG.
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
Source tree.

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 from http://jazz.external.hp.com/src/gnu/gnuframe.html, and then perform the following steps:

  1. :HELLO MANAGER.SYS
  2. :XEQ SH.HPBIN.SYS -L
  3. cd /usr/contrib/src/bash-2.04-mpe
  4. ./configure.mpe
  5. make
  6. make tests (optional)
  7. make install
Bash was easy to port to MPE.  You can view the source code diffs at http://jazz.external.hp.com/src/bash/bash-diff.txt.

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:

  1. :HELLO MANAGER.SYS
  2. :XEQ SH.HPBIN.SYS -L
  3. cd /bin
  4. mv sh sh.save
  5. ln -s /usr/contrib/bin/bash sh
To restore the original environment:
  1. :HELLO MANAGER.SYS
  2. :XEQ SH.HPBIN.SYS -L
  3. cd /bin
  4. rm sh
  5. mv sh.save sh

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.