code: 9ferno

Download patch

ref: fe52f7e86eea5e5f1b2066e1e33cb90471999769
parent: 6df3e7d241b2d6b07b029fe869c4efc9d933bcb4
author: henesy <unknown>
date: Sat Nov 17 00: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
+}