git: 9front

Download patch

ref: d673edbb9a728d22ced09cb0a9dc2bce567e2259
parent: 68d9155e1fff6c4c2d69c96f3fd4e7dc66cdeebd
author: Matthew Veety <mveety@mveety.com>
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'
--