code: purgatorio

Download patch

ref: 482e874528c6c86e661a3e4a1b9fda12f2346385
parent: 41e27b2d10c6a60c49931332e8677438736a1e36
author: henesy <devnull@localhost>
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