changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: bootrc: unmount devip *before* starting factotum

changeset 7394: ecaa7c8abd9c
parent 7393: 6033964e95d2
child 7395: 4b1fae89dd27
author: cinap_lenrek@felloff.net
date: Sat, 21 Sep 2019 18:48:14 +0200
files: sys/src/9/boot/bootrc
description: bootrc: unmount devip *before* starting factotum

we want devip to get reattached after hostowner has been written. factotum
already handles this with a private authdial() routine that mounts devip
when it is not present. so we detach devmnt before starting factotum,
and attach once factotum finishes.
     1.1--- a/sys/src/9/boot/bootrc
     1.2+++ b/sys/src/9/boot/bootrc
     1.3@@ -86,6 +86,9 @@ fn main{
     1.4 
     1.5 	# authentication agent
     1.6 	if(! test -f /srv/factotum){
     1.7+		# we remount ip inteface after hostowner is set
     1.8+		unmount '#I' /net >[2]/dev/null
     1.9+
    1.10 		x=(/boot/factotum -n -sfactotum)
    1.11 		if(~ $service cpu)
    1.12 			x=($x -S)
    1.13@@ -95,8 +98,6 @@ fn main{
    1.14 			x=($x -p)
    1.15 		must $x
    1.16 
    1.17-		# remount ip inteface after hostowner is set
    1.18-		unmount '#I' /net >[2]/dev/null
    1.19 		bind -qa '#I' /net
    1.20 	}
    1.21