code: 9ferno

Download patch

ref: 2b38105bb4f24e9990844be297b990307dc98a01
parent: 10ac118d3428b1352d2393cacc1d6f4fee8aa4da
author: 9ferno <gophone2015@gmail.com>
date: Wed Aug 11 08:30:06 EDT 2021

commented out broken code

--- a/os/init/disinit.b
+++ b/os/init/disinit.b
@@ -39,6 +39,7 @@
 	sys->bind("#l", "/net", sys->MAFTER);	# Network interfaces
 	sys->bind("#m","/dev",sys->MAFTER);     # pointer/mouse
 	sys->bind("#p", "/prog", sys->MREPL);	# prog device
+	sys->bind("#r", "/dev", sys->MAFTER);	# rtc
 	sys->bind("#t", "/dev", sys->MAFTER);	# serial line
 #	sys->bind("#v","/dev",sys->MAFTER);     # VGA
 	sys->bind("#I", "/net", sys->MAFTER);	# IP
@@ -50,14 +51,16 @@
 #	sys->bind("#T","/dev",sys->MAFTER);		# Touchscreen
 #	sys->bind("#W","/dev",sys->MAFTER);		# Flash
 
-	srv();
+	# TODO '#c/sysenv' seems obsolete
+	#sys->print("srv()\n");
+	#srv();
 
-	#sys->print("after the binds\n");
+	sys->print("loading /dis/sh.dis\n");
 	sh := load Sh "/dis/sh.dis";
 	(s, nil) := sys->stat("/dis/init");
 	if(s == 0){
-		#sys->print("spawn sh -n /dis/init\n");
-		spawn sh->init(nil, "sh" :: "-n" :: "/dis/init" :: nil);
+		sys->print("spawn sh -n /dis/init\n");
+		spawn sh->init(nil, "sh" :: "-x" :: "-n" :: "/dis/init" :: nil);
 	} else {
 		sys->fprint(stderr, "init: cannot find /dis/init: %r\n");
 		spawn sh->init(nil, "-n" :: nil);