[net.unix-wizards] Problems with: Activation of Csh from an `init' file.

mikec@reed.UUCP (Michael Cooper) (04/11/84)

I have written an init file that does a few things like password routines and
seting environment variables and then starts up csh via `execle'.  The problem
is that csh `knows' that it wasn't the
login shell and does source .login.
Also, it, of course, says `Not login shell.' when you try and logout.  Does 
anyone know how to `tell' csh that it is the login shell?  Is there some other
solution?


				Michael Cooper
				...!tektronix!reed!mikec

ebk@iedl02.UUCP (04/15/84)

when login starts up the login shell, argv[0] is a '-' followed by the name
of the command. for your init program:
execle("/bin/csh","-csh",NULL);

csh checks this first character to determine whether or not it was started
by login.

John Owens