home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.bash.bug
- Path: sparky!uunet!cis.ohio-state.edu!tct.COM!chip
- From: chip@tct.COM (Chip Salzenberg)
- Subject: Re: rsh, rcp with bash
- Message-ID: <2A7691FE.7354@tct.com>
- Sender: gnulists@ai.mit.edu
- Organization: TC Telemanagement, Clearwater, FL
- References: <9207241236.AA02088.SM@odin.INS.CWRU.Edu>
- Distribution: gnu
- Date: Wed, 29 Jul 1992 12:41:34 GMT
- Approved: bug-bash@prep.ai.mit.edu
- Lines: 55
-
- According to chet@po.cwru.edu:
- >Bash attempts to source the .bashrc for non-interactive shells running
- >rsh and rcp so things like $PATH get set.
-
- ... which is, in my opinion, a BIG mistake.
-
- Thus the following patch to Bash 1.12 to eliminate that behavior:
-
- Index: shell.c
- ***************
- *** 567,572 ****
- --- 575,585 ----
- bash foo NO
- foo NO
- + #if BUGGY_DASH_C
- rsh machine ls YES (for rsh, which calls `bash -c')
- rsh machine foo YES (for shell started by rsh) NO (for foo!)
- + #else
- + rsh machine ls NO
- + rsh machine foo NO
- + #endif
- echo ls | bash NO
- login YES
- ***************
- *** 574,580 ****
- */
- if (!act_like_sh && !no_rc &&
- ! (interactive_shell || (!isatty (fileno (stdin)) &&
- ! local_pending_command)))
- ! maybe_execute_file (bashrc_file);
-
- /* Try a TMB suggestion. If running a script, then execute the
- --- 587,602 ----
- */
- if (!act_like_sh && !no_rc &&
- ! (interactive_shell
- ! #if BUGGY_DASH_C
- ! /* I'm sorry, but Brian Fox is just plain wrong here.
- ! He'd like to read .bashrc on "rsh host ls", but I
- ! can't support the weirdness it requires. --Chip */
- ! || (!isatty (fileno (stdin)) && local_pending_command)
- ! #endif
- ! ))
- ! {
- ! maybe_execute_file (global_bashrc_file);
- ! maybe_execute_file (bashrc_file);
- ! }
-
- /* Try a TMB suggestion. If running a script, then execute the
-
- --
- Chip Salzenberg at Teltronics/TCT <chip@tct.com>, <73717.366@compuserve.com>
- "Do Rush place weird subliminal backmasked messages in their songs to
- compel unwilling geeks to commit evil .sig atrocities?" -- Dean Engelhardt
-
-