global cshrc files ?

global cshrc files ?

Post by Nis Peder Bon » Thu, 30 Jul 1992 20:02:12



Is it possible to make global .cshrc-files for csh and tcsh,
that are exec'd before the users own .cshrc-file ?

My system is Sun 4/330 with SunOS 4.1.1

Hope this ain't a FAQ or RTFM-question.

Please answer by e-mail and I shall summarize to comp.unix.shell.

                                Bonde
--

Systemadministrator, Datakontoret, Aarhus University
Phone     : +45 86 20 27 11 ext. 4993

Monday    : 10-12
Tuesday   : 10-14
Wednesday :  9-11
Friday    : 12-13

 
 
 

global cshrc files ?

Post by System Admin (Mike Peters » Sat, 01 Aug 1992 02:40:46



Quote:>Is it possible to make global .cshrc-files for csh and tcsh,
>that are exec'd before the users own .cshrc-file ?

Some systems invoke /etc/cshrc (or whatever) before running the users
.cshrc (similar for profile). What we do is give each user the following
.cshrc (and similar .login, .profile and .kshrc):

#
# .cshrc file - run for every C shell started.
# Version: 1992/06/25.
#
# Do the /usr/local/Master.cshrc file stuff first.
# Look there first to see what is being set automatically
# before making lots of additions here.
#
source /usr/local/Master.cshrc
#
# Optional (user-selectable) parameters - remove the '#' to activate.
#
#set noclobber          # activate to avoid overwriting files
#alias rm rm -i         # activate to confirm each file deletion
#setenv LIBDIR ~/lib    # set user-supplied library directory

This way they get the default stuff, but they are free to add stuff
at the end, or even abandon my '/usr/local/Master.cshrc'. Of course,
if they do that, they are on their own :-).
--
What are the chances that any computer system will ever "work" properly?
... and Slim just left town. -*- Mike Peterson, SysAdmin, U/Toronto Chemistry

 
 
 

1. How to terminate a global cshrc-file

Arch: Sun 4/330
SunOS: 4.1.1
Shell: csh

I have implemented a global cshrc-file by putting this line into
every users .cshrc-file:
                source /etc/csh.cshrc

So when a user starts a shell, /etc/csh.cshrc is executed BEFORE anything
else.

Now I want to put a command into /etc/csh.cshrc that terminates BOTH the
source of /etc/csh.cshrc AND the execution of the users .cshrc-file that
started the source.

I have tried many variants, but non of them seems to work.

"exit" only terminates the source of /etc/csh.cshrc but not the execution
of the .cshrc-file.

"kill -9 $$" kills BOTH the /etc/csh.cshrc, .cshrc AND the original
shell. But that is too much.

Is there a standard-solution?
I looked in the FAQ-list but couldn't find any references.
The manual doesn't say anything about this.

Please respond by E-mail, and I shall summarice to comp.unix.questions and
comp.unix.shell

                                Bonde
--

Systemadministrator, Datakontoret, Aarhus University
Phone     : +45 86 20 27 11 ext. 4993

Monday    : 10-12
Tuesday   : 12-14
Wednesday : 12-14
Thursday  : 12-14
Friday    : 10-11

2. INN 1.4 failing without UNIX domain sockets and network interface

3. global cshrc files ? (SUMMARY)

4. Hard Disk Space

5. How to terminate a global cshrc-file

6. CBQ implementation issues on linux

7. global cshrc/login file?

8. CD Player for IDE CD-ROM's

9. global .login/.cshrc without modify the user copy

10. How to make a global cshrc on Solaris

11. Wups, forgot something -- Re: [Q] global .login/.cshrc

12. Event Announcement: Internet Global Summit: Global Distruted Intelligence for Everyone