Submit #3147 » 0002-Update-pfi-pfi.conf-and-installer.sh-to-reflect-libd.patch
| etc/defaults/pfi.conf | ||
|---|---|---|
|
pfi_rc_actions=""
|
||
|
# Determines which installer frontend to use. Defaults to "curses";
|
||
|
# other legal options are "xorg", "cgi", and "none".
|
||
|
# other legal options are "xorg" and "none".
|
||
|
#
|
||
|
# "auto" will select curses or xorg based on the existence of DISPLAY
|
||
|
# "none" will cause the backend to listen on 0.0.0.0:9999 and allow a
|
||
|
# remote frontend to perform the installation.
|
||
|
pfi_frontend="auto"
|
||
| ... | ... | |
|
# EXAMPLE 1:
|
||
|
# Boot the installer headless, configure the network interface dc0,
|
||
|
# and start the CGI frontend.
|
||
|
# and connect to it using the remote frontend.
|
||
|
# pfi_frontend="none" will cause the backend to listen on 0.0.0.0:9999
|
||
|
# and allow a remote frontend to perform the installation.
|
||
|
# ie: dfuife_curses -r x.x.x.x:999 -t tcp) on the frontend.
|
||
|
#
|
||
|
# ifconfig_dc0="DHCP"
|
||
|
# pfi_rc_actions="netif dhclient"
|
||
|
# pfi_frontend="cgi"
|
||
|
# pfi_frontend="none"
|
||
|
# pfi_autologin="installer"
|
||
|
# pfi_shutdown_command="shutdown -r now"
|
||
| nrelease/root/etc/rc.d/pfi | ||
|---|---|---|
|
. /etc/rc.subr
|
||
|
trap pfi_cleanup 0 1 2 3 6 15
|
||
|
name=pfi
|
||
|
start_cmd="pfi_start"
|
||
|
stop_cmd=":"
|
||
| ... | ... | |
|
# Append the contents of pfi.conf onto rc.conf, so that settings
|
||
|
# (such as ifconfig_dc0="DHCP") will be picked up by pfi_rc_actions.
|
||
|
# The pfi_cleanup() function will reverse this afterwards.
|
||
|
cp /etc/rc.conf /etc/rc.conf.orig
|
||
|
cat /etc/pfi.conf >>/etc/rc.conf
|
||
| ... | ... | |
|
done
|
||
|
fi
|
||
|
# Restore the original rc.conf.
|
||
|
mv /etc/rc.conf.orig /etc/rc.conf
|
||
|
# Set up auto-login if requested.
|
||
|
if [ "X$pfi_autologin" != "XNONE" ]; then
|
||
| ... | ... | |
|
echo " :al=${pfi_autologin}:tc=Pc:" >> /etc/gettytab
|
||
|
sed -i '' 's|^ttyv0.*|ttyv0 "/usr/libexec/getty AL.pfi" cons25 on secure|' /etc/ttys
|
||
|
fi
|
||
|
}
|
||
|
# Finally, start thttpd if the user wants to use
|
||
|
# the cgi frontend.
|
||
|
pfi_cleanup()
|
||
|
{
|
||
|
# Restore the original rc.conf.
|
||
|
if [ "X$pfi_frontend" = "Xcgi" ]; then
|
||
|
echo "Starting thttpd..."
|
||
|
/usr/local/sbin/thttpd_wrapper &
|
||
|
fi
|
||
|
[ -f /etc/rc.conf.orig ] && mv /etc/rc.conf.orig /etc/rc.conf
|
||
|
}
|
||
|
load_rc_config $name
|
||
| usr.sbin/installer/installer/installer.sh | ||
|---|---|---|
|
fi
|
||
|
case "X$pfi_frontend" in
|
||
|
Xqt)
|
||
|
none)
|
||
|
for x in `ifconfig -l`; do echo -n "$x:";ifconfig $x|grep -e "inet ";done
|
||
|
$pfi_backend \
|
||
|
-o $SOURCE_DIR \
|
||
|
-r $RENDEZVOUS \
|
||
|
-t $pfi_dfui_transport
|
||
|
RESULT=$?
|
||
|
;;
|
||
|
Xcgi)
|
||
|
$pfi_backend \
|
||
|
-o $SOURCE_DIR \
|
||
|
-r $RENDEZVOUS \
|
||
|
-t $pfi_dfui_transport
|
||
|
-r 0.0.0.0:9999 \
|
||
|
-t tcp
|
||
|
RESULT=$?
|
||
|
;;
|
||
|
Xcursesvty)
|
||
- « Previous
- 1
- 2
- Next »