shithub: x

Download patch

ref: 79c6404377c27bdd84d5743020cdf17d9696e1d0
parent: 020e88c686a75f53c7238f3b8bd3b94319789248
author: kvik <kvik@a-b.xyz>
date: Wed Aug 28 17:12:33 EDT 2019

x/mnt: more robust handling of remounting an already posted sshfs

try to remount an already posted service channel; if the channel didn't
exist or the mount otherwise failed then (re)connect the sshfs.

--- a/mnt
+++ b/mnt
@@ -17,9 +17,8 @@
 	}
 	for(u in $user){
 		userhost=$u@$host
-		if(! test -e /srv/$userhost)
-			sshfs -M -r / -s $userhost $userhost
-		mount -c /srv/$userhost /x/$userhost
+		mount -c /srv/$userhost /x/$userhost >[2]/dev/null \
+		|| sshfs -M -r / -s $userhost $userhost
 	}
 }