shithub: purgatorio

Download patch

ref: 7a7dfee4fab3e9a725422edff93251ef0a717492
parent: 27598a9c874c115795a3d59de093f8f158a73d87
author: henesy <devnull@localhost>
date: Sat Nov 17 00:19:43 EST 2018

move logic to newuser for ease of use

--- a/dis/makestubs	Sat Nov 17 00:10:49 2018
+++ b/dis/makestubs	Sat Nov 17 00:19:43 2018
@@ -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	Sun Oct 31 09:33:26 2021
+++ b/dis/newuser	Sat Nov 17 00:19:43 2018
@@ -0,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
+}