made sure that rcmain.local runs independent of the existence of $home/lib/profile. Documented /rc/lib/rcmain, /rc/lib/rcmain.local, $home/lib/profile in rc(1) and the first two in namespace(4)
This commit is contained in:
parent
04a8392f8c
commit
1c0ba2019e
3 changed files with 21 additions and 4 deletions
|
@ -16,17 +16,17 @@ if not{
|
||||||
}
|
}
|
||||||
fn sigexit
|
fn sigexit
|
||||||
if(! ~ $#cflag 0){
|
if(! ~ $#cflag 0){
|
||||||
if(flag l && /bin/test -r $home/lib/profile){
|
if(flag l){
|
||||||
if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
|
if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
|
||||||
. $home/lib/profile
|
if(/bin/test -r $home/lib/profile) . $home/lib/profile
|
||||||
}
|
}
|
||||||
status=''
|
status=''
|
||||||
eval $cflag
|
eval $cflag
|
||||||
}
|
}
|
||||||
if not if(flag i){
|
if not if(flag i){
|
||||||
if(flag l && /bin/test -r $home/lib/profile){
|
if(flag l){
|
||||||
if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
|
if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
|
||||||
. $home/lib/profile
|
if(/bin/test -r $home/lib/profile) . $home/lib/profile
|
||||||
}
|
}
|
||||||
status=''
|
status=''
|
||||||
if(! ~ $#* 0) . $*
|
if(! ~ $#* 0) . $*
|
||||||
|
|
13
sys/man/1/rc
13
sys/man/1/rc
|
@ -973,6 +973,19 @@ as they are executed).
|
||||||
.PD
|
.PD
|
||||||
.SH SOURCE
|
.SH SOURCE
|
||||||
.B /sys/src/cmd/rc
|
.B /sys/src/cmd/rc
|
||||||
|
.SH FILES
|
||||||
|
.TF $home/lib/profile
|
||||||
|
.TP
|
||||||
|
.B $home/lib/profile
|
||||||
|
the user's local rc start script
|
||||||
|
.TF /rc/lib/rcmain
|
||||||
|
.TP
|
||||||
|
.B /rc/lib/rcmain
|
||||||
|
System rc start script
|
||||||
|
.TF /rc/lib/rcmain.local
|
||||||
|
.TP
|
||||||
|
.B /rc/lib/rcmain.local
|
||||||
|
Site specific system rc start script
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
Tom Duff,
|
Tom Duff,
|
||||||
``Rc \- The Plan 9 Shell''.
|
``Rc \- The Plan 9 Shell''.
|
||||||
|
|
|
@ -153,6 +153,10 @@ Directory of shell libraries.
|
||||||
Startup code for
|
Startup code for
|
||||||
.IR rc (1).
|
.IR rc (1).
|
||||||
.TP
|
.TP
|
||||||
|
.B /rc/lib/rcmain.local
|
||||||
|
Site local startup code for
|
||||||
|
.IR rc (1).
|
||||||
|
.TP
|
||||||
.B /lib
|
.B /lib
|
||||||
Collections of data, generally not parts of programs.
|
Collections of data, generally not parts of programs.
|
||||||
.TP
|
.TP
|
||||||
|
|
Loading…
Reference in a new issue