shithub: riscv

Download patch

ref: 04a8392f8c7c75f585d48360774c6f1faa950f0c
parent: 9e09742e9b5789a94b7676ff5f4e01468d2f2d88
author: Matthew Veety <[email protected]>
date: Mon Dec 7 11:01:09 EST 2015

Added change to /rc/lib/rcmain to allow execution of /rc/lib/rcmain.local if it exists. /rc/lib/rcmain.local is similar to $home/lib/profile in that it will only be executed with -l, but is site-wide.

--- a/rc/lib/rcmain
+++ b/rc/lib/rcmain
@@ -16,12 +16,18 @@
 }
 fn sigexit
 if(! ~ $#cflag 0){
-	if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile
+	if(flag l && /bin/test -r $home/lib/profile){
+		if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
+		. $home/lib/profile
+	}
 	status=''
 	eval $cflag
 }
 if not if(flag i){
-	if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile
+	if(flag l && /bin/test -r $home/lib/profile){
+		if(/bin/test -r /rc/lib/rcmain.local) . /rc/lib/rcmain.local
+		. $home/lib/profile
+	}
 	status=''
 	if(! ~ $#* 0) . $*
 	. -i '#d/0'