[comp.mail.mush] DEFAULT_RC

metcalfe@NPRDC.NAVY.MIL (Margen Metcalfe) (07/11/90)

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?

Thank you for your assistance.



			Margen Metcalfe
			metcalfe@nprdc.navy.mil

schaefer@CSE.OGI.EDU (Barton E. Schaefer) (07/11/90)

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