Article View: comp.mail.mush
Article #412Re: DEFAULT_RC
From: Barton E. Schaefer
Date: Tue, 10 Jul 1990 23:00
Date: Tue, 10 Jul 1990 23:00
40 lines
2164 bytes
2164 bytes
On Jul 10, 3:41pm, Margen Metcalfe wrote:
} Subject: DEFAULT_RC
}
} I have a default system Mushrc initialization file installed
} that contains commands that I want mush to set for everyone.
} If a user has their own .mushrc or .mailrc file that sets one of these
} commands to something else, the system default is ignored.
} Is this the normal behavior? If so, how can I enforce a command for
} everyone?
Yes, this is the normal behavior -- the user's init file overrides the
system-wide one. The system file is mainly intended to provide a uniform
environment for first-time or non-expert users, with simple things like
variable settings, ignored headers, etc. For example, many Mushrc (or
Mailrc for UCB) files include "set ask" to cause users to be prompted for
the subject. Experienced users who do not wish to be prompted are then
able to "unset ask" in their .mushrc files to suppress this.
The only way to "enforce" a command for everyone would be to change the
behavior of the "cmd" and "uncmd" commands themselves. Unfortunately,
due to limitations on use of the history-reference notation when sourcing
init files, there is no way to do this invisibly; you must either disable
"cmd" and "uncmd" or leave them alone.
Disabling "cmd" is not difficult:
cmd '\uncmd' uncmd
cmd uncmd "echo You are not allowed to uncmd"
cmd '\cmd' cmd
cmd cmd "echo You are not allowed to cmd"
(Note that order here is important, you have to do "cmd cmd" last, and
all of these must be the very last thing in the file.) However, a clever
user might still find the way around this.
What sort of command are you trying to enforce? There might be another
way to accomplish what you want.
--
Bart Schaefer schaefer@cse.ogi.edu
Technical Details
Message-ID:
<9007102300.AA27717@cse.ogi.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!clyde.concordia.ca!mcgill-vision!snorkelwacker!bloom-beacon!CSE.OGI.EDU!schaeferShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!clyde.concordia.ca!mcgill-vision!snorkelwacker!bloom-beacon!CSE.OGI.EDU!schaefer From: schaefer@CSE.OGI.EDU (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: DEFAULT_RC Message-ID: <9007102300.AA27717@cse.ogi.edu> Date: 10 Jul 90 23:00:14 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 40