shithub: riscv

Download patch

ref: 63003069e3812b6f7a53996967919404635dfeef
parent: 88631519b59348537d092b1b4f6298e3d8e24fc7
author: qwx <qwx@sciops.net>
date: Thu Jan 23 05:16:35 EST 2025

revert 88631519b59348537d092b1b4f6298e3d8e24fc7, 9cc3442d4a250855f09dd663ded45cbd4c99fe28

these changes break the default profile: /usr/bin instead of
/usr/glenda/bin, webcookies handling for readonly iso, etc.
will be revisited.

--- a/sys/lib/dist/usr/glenda/lib/profile
+++ b/sys/lib/dist/usr/glenda/lib/profile
@@ -1,12 +1,12 @@
-bind -a /usr/bin/rc /bin
-bind -a /usr/bin/$cputype /bin
-mount -qC /srv/cwfs /n/other other
-bind -qc /n/other/usr/$user/tmp /usr/tmp
-bind -c /usr/tmp /tmp
+bind -a $home/bin/rc /bin
+bind -a $home/bin/$cputype /bin
+if(! syscall create /tmp/xxx 1 0666 >[2]/dev/null)
+	ramfs	# in case we're running off a cd
 font=/lib/font/bit/vga/unicode.font
 switch($service){
 case terminal
-	webcookies
+	if(! webcookies >[2]/dev/null)
+		webcookies -f /tmp/webcookies
 	webfs
 	plumber
 	echo -n accelerated > '#m/mousectl'
@@ -19,20 +19,12 @@
 	bind -q /mnt/term/dev/consctl /dev/consctl
 	>[2] /dev/null {
 		cp /dev/sysname /mnt/term/dev/label
-		if(wsys=`{cat /mnt/term/env/wsys})
-			wsys=/mnt/term^$wsys
+		if(test -s /mnt/term/env/wsys)
+			wsys=/mnt/term^`{cat /mnt/term/env/wsys}
 	} 
 	bind -a /mnt/term/dev /dev
 	prompt=('cpu% ' '	')
 	fn cpu%{ $* }
-	if(! test -e /mnt/term/dev/wsys){
-		# call from drawterm
-		auth/factotum
-		webcookies
-		webfs
-		plumber
-		rio
-	}
 case con
 	prompt=('cpu% ' '	')
 }
--- a/sys/lib/newuser
+++ b/sys/lib/newuser
@@ -29,7 +29,7 @@
 	echo -n 'res 3' > '#m/mousectl'
 	prompt=('term% ' '	')
 	fn term%{ $x^* }
-	rio -i riostart
+	rio
 case cpu
 	bind /mnt/term/dev/cons /dev/cons
 	bind -q /mnt/term/dev/consctl /dev/consctl
@@ -63,12 +63,6 @@
 	prompt=('cpu% ' '	')
 }
 !
-
-cat > bin/rc/riostart <<!
-#!/bin/rc
-!
-chmod +x bin/rc/riostart
-
 cat > lib/plumbing <<!
 # to update: cp $$home/lib/plumbing /mnt/plumb/rules
 
--