shithub: x

Download patch

ref: b443dc88c294aafcc560d726ba03d98da59d616a
parent: b77fd67eca2958623314acf29c05dfbabd14c90d
author: Romano <me+git@fallglow.com>
date: Thu Jun 27 13:04:50 EDT 2024

use /n/x instead of /x

--- a/mnt
+++ b/mnt
@@ -15,8 +15,8 @@
 	}
 	for(u in $user){
 		userhost=$u@$host
-		mount -c /srv/$userhost /x/$userhost >[2]/dev/null \
-		|| sshfs -s $userhost -m /x/$userhost -r / $userhost
+		mount -c /srv/$userhost /n/x/$userhost >[2]/dev/null \
+		|| sshfs -s $userhost -m /n/x/$userhost -r / $userhost
 	}
 }
 
--- a/path
+++ b/path
@@ -13,14 +13,14 @@
 for(arg){
 	switch($arg){
 	case -P
-		sed='s,/[^/]+/[^/]+(.*),\1,'
+		sed='s,/[^/]+/[^/]+/[^/]+(.*),\1,'
 	case -p
-		sed='s,/[^/]+/[^/]+/(.*),\1,'
+		sed='s,/[^/]+/[^/]+/[^/]+/(.*),\1,'
 	case -r
-		sed='s,(/[^/]+/[^/]+).*,\1,'
+		sed='s,(/[^/]+/[^/]+/[^/]+).*,\1,'
 	case -l
 		sed=()
-		echo $wd | awk -F/ '{if($3) print $3; else print $0}'
+		echo $wd | awk -F/ '{if($4) print $4; else print $0}'
 	}
 	shift
 }
--- a/x.man
+++ b/x.man
@@ -42,7 +42,7 @@
 at the
 .IR mntgen (4)
 provided mountpoint under
-.I /x
+.I /n/x
 named after the
 .B user@host
 login tuple used to mount the system.
@@ -54,15 +54,13 @@
 here to provide some further convenience.
 .SH SETUP
 .PP
-Create the
-.I /x
-directory on your root file server and make sure to have the
+Start
 .IR mntgen (4)
-started somewhere convenient, perhaps in your profile:
+with a mount point of
+.I /n/x
+somewhere convenient, perhaps in your profile:
 .EX
-; mount -c /srv/boot /n/boot
-; mkdir /n/boot/x
-; mntgen /x
+; mntgen /n/x
 .EE
 .SH COMMANDS
 .PP
@@ -97,7 +95,7 @@
 .B cd(1)
 will be prepended to the command to execute it in the correct
 context.  For example, given the current directory
-.B /x/me@moskvax/home/me/prog
+.B /n/x/me@moskvax/home/me/prog
 running
 .B x/run make
 will execute