code: drawterm

Download patch

ref: 68fe504f349dd77566041e69f6b2534ec57707e0
parent: 5811e042319450a2dd86641c64e39fec8dac7280
author: 23hiro <23hiro@gmail.com>
date: Sat Feb 20 19:27:56 EST 2016

Ask for cpu and auth servers when none are specified on cli or environment, be consistent with plan9 boot. Most helpful on windows.

--- a/cpu.c
+++ b/cpu.c
@@ -152,11 +152,7 @@
 	user = getenv("USER");
 	secstoreserver = nil;
 	authserver = getenv("auth");
-	if(authserver == nil)
-		authserver = "auth";
 	system = getenv("cpu");
-	if(system == nil)
-		system = "cpu";
 	ARGBEGIN{
 	case 'a':
 		authserver = EARGF(usage());
@@ -200,8 +196,14 @@
 	if(argc != 0)
 		usage();
 
+	if(system == nil)
+		system = readcons("cpuserver", "cpu", 0);
+
 	if(user == nil)
-		user = readcons("user", nil, 0);
+		user = readcons("user", "glenda", 0);
+
+	if(authserver == nil)
+		authserver = readcons("authserver", system, 0);
 
 	if(mountfactotum() < 0){
 		if(secstoreserver == nil)