date and time created 88/07/21 17:33:43 by marc
[unix-history] / usr / src / local / toolchest / ksh / README
To generate the binaries, just type make in the top level directory.
If you have 4th. generation make (aka "nmake") you can use it instead of make.
The makefiles try to be self configuring but on non-standard versions
of UNIX it may be necessary to invoke make with certain options
specified. With the old make, you can explicitly set compile time
options by invoking it as make OPTIONS='option list' where the
list of possible options is in the makefile. With the new make, each
option that you want to specify can by achieved with an argument of the
form option=1. The list of definable options are in the Makefile.
The binary for ksh-i becomes the file named ./ksh which can be copied to
where ever you install it. If you want ksh-i to be able to run setuid/gid
shell scripts, or scripts without read permission, then it must be installed
in the /bin directory, the /usr/bin directory, or the /usr/lbin directory
and the name must end in sh. The program suid_exec must be installed in the
/etc directory, must be owned by root, and must be a suid program. If
you must install ksh-i in some other directory and want to be able to run
setuid/setgid and execute only scripts, then you will have to change the
source code file sh/suid_exec.c explicitly.
Ksh-i has been successfully installed as /bin/sh on several machines.
The file sh.1 contains the troff (man) description of this Shell.
The file sh.memo contains a troff (mm) memo describing ksh-i. The
file RELEASE contains the changes made in this release since the previous one.
The file COMPATIBILITY contains a list of incompatibilities with the S5R2 sh.
The module sh/msg.c has a list of about twenty-five default aliases compiled in.
The number of builtin aliases is in sh/builtins.h. Alias names starting
with / become tracked aliases.
The file sh/timeout.h contains a parameter TIMEOUT which can be set to
the number of seconds that the shell will wait for input before it
warns you and exits. The default is 0 which never times out. You can
set the shell parameter TMOUT to shorten the timeout interval but not to
increase it.
This version contains one line edit modes for vi and/or emacs.
The original emacs code was given to me by Mike Veach at IH.
The original vi code was given to me by Pat Sullivan at CB.
If the EDITOR or VISUAL variable ends in emacs, gmacs, or vi, the
corresponding edit mode is selected. The set -o(+o) can be used to turn
editing modes on(off).
A library of the code for the editing and history features can be generated
with the file sh/makelib. This library can be added to most programs to enable
emacs or vi mode input. The library generated with makelib is called libedit.a.
This version removes the archaic definition of ^ as a synonym for pipe.
The scripts /usr/src/:mkcmd and /etc/shutdown use the ^ as a synonym for |
and must be changed if you install this shell as /bin/sh.
This version passes 8-bit characters transparently. As a result programs
which assume that the shell will strip off the 8th bit will fail. In
particular, the vi command puts an 8th bit on the characters corresponding
to % when invoking a shell. The best solution is to fix the vi command.
However, if necessary, you can change the value of STRIP in sh/defs.h from
0377 to 0177 and rebuild a seven bit version of ksh-i.
It is advisable that you put the line PWD=$HOME;export PWD into the
/etc/profile file to reduce initialization time for ksh-i. If you
install this shell as /bin/sh you may have to make /bin/pwd a setuid
program to handle cases where setuid programs started by /etc/cron
change directories and then invoke shell procedures. Also, if you install
this shell as /bin/sh some setuid programs may break because the set -p
option is implicitly invoked for security. You can create a file named
/etc/suid_profile and put define the PATH variable in this file to get
these scripts to work again.
The makefile is set up so that it doesn't use the SXT compile option
even if you have an SXT driver because problems with the SXT driver prevent
is reliable use. However, if you do compile with the SXT driver and use
the shell with the layers program, then you must fix a bug in layers.c
which causes the first layer to die sometimes. In the case switch in
the resetlogin routine you must add a default case which does a wait(0).
The makefiles should automatically configure themselves for System V
release[123], System III, BSD 4.[123], uts, and DOMAIN/IX. The makefiles
currently know about the 3B's, IBM maxi-UNIX, sun, and pdp11 class machines
including the PC 6300+.
There is a VFORK compile time option that can be selected for operating
systems that have the vfork() system call. If the time for fork() is
substantially greater than for vfork() then you should use this option. By
default it is set for the apollo DOMAIN/IX operating system.
Please report any problems or suggestions to:
David Korn
ulysses!dgk
Good luck!!