code: 9ferno

Download patch

ref: 886451766b6f460d9e58cc3b9650a6d7c4929f3c
parent: e640104ebd40e4d18d9716bf183ea813b7a18e61
author: henesy <unknown>
date: Fri Mar 8 15:29:18 EST 2019

add usage to newuser ;; document newuser

--- a/POSTINSTALL
+++ b/POSTINSTALL
@@ -1,11 +1,14 @@
 Post-installation setup procedures
 
-When in doubt, refer to the install document located in /doc.
+Note: When in doubt, refer to the install document located in /doc.
 
-If directories are missing, run makestubs as per:
+If directories are missing, such as when running hosted,run makestubs as per
 
 	$ emu
 	; makestubs
 
-if Inferno is being hosted.
+If you want to create a new user by name on the fs, if hosted:
+
+	$ emu
+	; newuser myusername
 
--- a/dis/newuser
+++ b/dis/newuser
@@ -2,6 +2,19 @@
 # Initialise directories and files for a new user
 load std
 
+args = $*
+argv0 = $0
+user = $1
+
+fn usage {
+		echo >[1=2] usage: $argv0 username
+		exit usage
+}
+
+if {! ~ $#args 1} {
+	usage
+}
+
 user=$1
 home=/usr/$user