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