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