code: purgatorio

Download patch

ref: 7a7dfee4fab3e9a725422edff93251ef0a717492
parent: 27598a9c874c115795a3d59de093f8f158a73d87
author: henesy <devnull@localhost>
date: Fri Nov 16 18:19:43 EST 2018

move logic to newuser for ease of use

--- a/dis/makestubs
+++ b/dis/makestubs
@@ -4,12 +4,11 @@
 load std
 
 user=`{cat /dev/user}
-home=/usr/$user
-dirs=($home/keyring $home/dis $home/module /tmp /mnt/keys /mnt/registry /mnt/acme /n/remote /chan /keydb)
 
-mkdir -p $home
-cp -r /usr/inferno/* $home/
+dirs=(/tmp /mnt/keys /mnt/registry /mnt/acme /n/remote /chan /keydb)
 
 for i in $dirs {
 	mkdir -p $i
 }
+
+/dis/newuser $user
--- /dev/null
+++ b/dis/newuser
@@ -1,0 +1,15 @@
+#!/dis/sh
+# Initialise directories and files for a new user
+load std
+
+user=$1
+home=/usr/$user
+
+dirs=($home/keyring $home/dis $home/module)
+
+mkdir -p $home
+cp -r /usr/inferno/* $home/
+
+for i in $dirs {
+	mkdir -p $i
+}