Project

General

Profile

0002-Update-pfi-pfi.conf-and-installer.sh-to-reflect-libd.patch

ddegroot, 10/09/2018 01:25 PM

View differences:

etc/defaults/pfi.conf
12 12
pfi_rc_actions=""
13 13

  
14 14
# Determines which installer frontend to use.  Defaults to "curses";
15
# other legal options are "xorg", "cgi", and "none".
15
# other legal options are "xorg" and "none".
16 16
#
17 17
# "auto" will select curses or xorg based on the existence of DISPLAY
18
# "none" will cause the backend to listen on 0.0.0.0:9999 and allow a
19
# remote frontend to perform the installation.
18 20

  
19 21
pfi_frontend="auto"
20 22

  
......
84 86

  
85 87
# EXAMPLE 1:
86 88
# Boot the installer headless, configure the network interface dc0,
87
# and start the CGI frontend.
89
# and connect to it using the remote frontend.
90
# pfi_frontend="none" will cause the backend to listen on 0.0.0.0:9999
91
# and allow a remote frontend to perform the installation.
92
# ie: dfuife_curses -r x.x.x.x:999 -t tcp) on the frontend.
88 93
#
89 94
# ifconfig_dc0="DHCP"
90 95
# pfi_rc_actions="netif dhclient"
91
# pfi_frontend="cgi"
96
# pfi_frontend="none"
92 97
# pfi_autologin="installer"
93 98
# pfi_shutdown_command="shutdown -r now"
94 99

  
nrelease/root/etc/rc.d/pfi
8 8

  
9 9
. /etc/rc.subr
10 10

  
11
trap pfi_cleanup 0 1 2 3 6 15
12

  
11 13
name=pfi
12 14
start_cmd="pfi_start"
13 15
stop_cmd=":"
......
120 122

  
121 123
	# Append the contents of pfi.conf onto rc.conf, so that settings
122 124
	# (such as ifconfig_dc0="DHCP") will be picked up by pfi_rc_actions.
125
	# The pfi_cleanup() function will reverse this afterwards.
123 126

  
124 127
	cp /etc/rc.conf /etc/rc.conf.orig
125 128
	cat /etc/pfi.conf >>/etc/rc.conf
......
185 188
		done
186 189
	fi
187 190

  
188
	# Restore the original rc.conf.
189

  
190
	mv /etc/rc.conf.orig /etc/rc.conf
191

  
192 191
	# Set up auto-login if requested.
193 192

  
194 193
	if [ "X$pfi_autologin" != "XNONE" ]; then
......
196 195
		echo "        :al=${pfi_autologin}:tc=Pc:" >> /etc/gettytab
197 196
		sed -i '' 's|^ttyv0.*|ttyv0 "/usr/libexec/getty AL.pfi" cons25 on secure|' /etc/ttys
198 197
	fi
198
}
199 199

  
200
	# Finally, start thttpd if the user wants to use
201
	# the cgi frontend.
200
pfi_cleanup()
201
{
202
	# Restore the original rc.conf.
202 203

  
203
	if [ "X$pfi_frontend" = "Xcgi" ]; then
204
		echo "Starting thttpd..."
205
		/usr/local/sbin/thttpd_wrapper &
206
	fi
204
	[ -f /etc/rc.conf.orig ] && mv /etc/rc.conf.orig /etc/rc.conf
207 205
}
208 206

  
209 207
load_rc_config $name
usr.sbin/installer/installer/installer.sh
82 82
	fi
83 83

  
84 84
	case "X$pfi_frontend" in
85
	Xqt)
85
	none)
86
		for x in `ifconfig -l`; do echo -n "$x:";ifconfig $x|grep -e "inet ";done
86 87
		$pfi_backend \
87 88
		    -o $SOURCE_DIR \
88
		    -r $RENDEZVOUS \
89
		    -t $pfi_dfui_transport
90
		RESULT=$?
91
		;;
92
	Xcgi)
93
		$pfi_backend \
94
		    -o $SOURCE_DIR \
95
		    -r $RENDEZVOUS \
96
		    -t $pfi_dfui_transport
89
		    -r 0.0.0.0:9999 \
90
		    -t tcp
97 91
		RESULT=$?
98 92
		;;
99 93
	Xcursesvty)
100
-