🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #600

Sourcing .bash_profile with rsh (Bash-1.03)

#600
From: John Franks
Date: Fri, 15 Sep 1989 14:23
42 lines
1853 bytes
With bash-1.03 when I run 
	rsh remote command

I get my expected output but it is preceded by:

	Where are you?
	[: too many arguments
	stty: not supported on sockets

When I run 
	rsh remote

everything works as it should.

The issue is whether .bash_profile should be sourced when I do an rsh.
The  behavior  of  /bin/sh  is  to source .profile for the comman "rsh
remote" but not for the command "rsh remote command".   This  behavior
can  be  achieved  by  the  change  below to shell.c.  The comments in
shell.c  seem  to  indicate  that  there  was   the   intention   that
.bash_profile  be sourced for all rsh's so that the path would be set.
I don't know how to do this, but I'm  pretty  sure  the  Bourne  shell
passes the local environment and hence gets the local path.  


*** shell.c.orig	Fri Sep  8 16:06:55 1989
--- shell.c	Fri Sep 15 08:37:56 1989
***************
*** 333,337 ****
       sure that we run the .login stuff so that the user can
       set his/her PATH. */
!   if (!login_shell)
      {
        char *t = get_string_value ("SHLVL");
--- 333,337 ----
       sure that we run the .login stuff so that the user can
       set his/her PATH. */
!   if (!login_shell && interactive)
      {
        char *t = get_string_value ("SHLVL");
John Franks 	Dept of Math. Northwestern University
		Internet	john@math.nwu.edu
		Bitnet		j_franks@nuacc
Technical Details
Message-ID: <1153@accuvax.nwu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!cs.utexas.edu!mailrus!accuvax.nwu.edu!hopf.math.nwu.edu!john

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!cs.utexas.edu!mailrus!accuvax.nwu.edu!hopf.math.nwu.edu!john
From: john@hopf.math.nwu.edu (John Franks)
Newsgroups: gnu.bash.bug
Subject: Sourcing .bash_profile with rsh  (Bash-1.03)
Message-ID: <1153@accuvax.nwu.edu>
Date: 15 Sep 89 14:23:56 GMT
Sender: news@accuvax.nwu.edu
Reply-To: john@hopf.math.nwu.edu (John Franks)
Distribution: gnu
Organization: Northwestern Univ. Evanston, Il.
Lines: 42