Bugs - make and chsh
Stephen MacKay
samackay at watcgl.waterloo.edu
Wed Feb 20 06:56:44 AEST 1991
I am a member of the development team of the Harmony realtime
operating system. Part of that work is porting our development to
various environments, including A/UX 2.0. I found 2 apparent bugs
last week while putting the finishing touches on our tools. The
first is serious for us, the second is not, but they both have
painful workarounds.
1) 'make' include files
The 'include' facility of make is documented, in part, as: "If
the string 'include' or 'Include' appears as the first seven
characters of a line ... 'make' assumes that the rest of the line
is the name of a description file, which is read by the current
invocation of 'make', after macro substitution." Unfortunately,
macro substitution does not occur. I have a line much like the
following in my makefile:
include ${StdScriptsDir}/makeinc
where ${StdScriptsDir} is an environment variable that gives the
name of a directory where many common script files are kept. I
have tried several workarounds (such as defining a real make
macro called ${StdScriptsDir} instead of an environment variable)
but the only 2 things that seem to work are using a full pathname
(absolute or relative), which is completely unacceptable, or
replicating the contents of ${StdScriptsDir}/makeinc in every one
of a couple dozen makefiles, which is a maintenance nightmare.
2) 'chsh' to Bourne or login problem?
I normally run with the C shell (/bin/csh), but I needed to test
some scripts with the Bourne (/bin/sh) and Korn (/bin/ksh)
shells. While I had no trouble at all changing to the Korn shell
and back to the C shell using the 'chsh' command. I was not able
to set my login shell to be the Bourne shell. The chsh command
changed my entry in the /etc/passwd file correctly for the Korn
and C shells but when I tried to set Bourne, the "shell" field
was left blank. That may be correct behavior because the Bourne
shell is supposed to be the default, but when I tried to login
with that field blank I got a strange result. My .profile file
was run as if I had a Bourne shell but when it finished it left
me sitting in a C shell - my .login file was NOT run (as it would
have been if I had set my shell to be the C shell).
Su can cheat and change the /etc/passwd entry to "/bin/sh" by
manually editing /etc/passwd. Then logging into a Bourne shell
works correctly.
Comments, fixes, promises from Apple, etc. on either of these 2
problems?
...Stephen MacKay
Software Engineering Lab, Inst. for Information Technology
National Research Council of Canada
mackay at iit.nrc.ca
More information about the Comp.unix.aux
mailing list