From 1fbdf869e939cbf8c3a115be01e90020940b38e2 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Tue, 2 Aug 2005 17:02:59 +0000 Subject: [PATCH] Reduce diffs with BSD Installer repo: - Add/update explanatory comments. - Honour $pfi_backend variable when running on serial port. --- nrelease/installer/etc/rc.d/pfi | 16 ++++++++++++---- nrelease/installer/usr/local/bin/installer | 11 +++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/nrelease/installer/etc/rc.d/pfi b/nrelease/installer/etc/rc.d/pfi index f58cf1f933..1a3fb8f30e 100755 --- a/nrelease/installer/etc/rc.d/pfi +++ b/nrelease/installer/etc/rc.d/pfi @@ -1,7 +1,7 @@ #!/bin/sh -# $Id: pfi,v 1.4 2004/08/06 23:26:05 cpressey Exp $ -# $DragonFly: src/nrelease/installer/etc/rc.d/pfi,v 1.6 2005/03/07 18:02:07 cpressey Exp $ +# $Id: pfi,v 1.12 2005/03/07 06:18:21 cpressey Exp $ +# $DragonFly: src/nrelease/installer/etc/rc.d/pfi,v 1.7 2005/08/02 17:02:59 cpressey Exp $ # # PROVIDE: pfi @@ -22,6 +22,10 @@ get_pfi_config() echo " found!" tr -d "\r" < $1/pfi.conf > /etc/pfi.conf echo "pfi_found_on_device='$2'" >> /etc/pfi.conf + + # If the pfi.conf says to run a custom script from the pfi + # media, run it now, so that it has access to the pfi media. + if [ -r /etc/defaults/pfi.conf ]; then . /etc/defaults/pfi.conf fi @@ -100,16 +104,20 @@ pfi_start() look_for_pfi_config_cd9660 look_for_pfi_config_msdos + # If the search was not successful, stub out a dummy pfi.conf. + if [ ! -r /etc/pfi.conf ]; then echo '' >/etc/pfi.conf fi - # Tack pfi.conf onto the end of rc.conf, so that variables in - # pfi.conf are available to the rc subsystem (for pfi_rc_actions.) + # 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. cp /etc/rc.conf /etc/rc.conf.orig cat /etc/pfi.conf >>/etc/rc.conf + # Read in the pfi.conf we either found or created for ourselves. + if [ -r /etc/defaults/pfi.conf ]; then . /etc/defaults/pfi.conf fi diff --git a/nrelease/installer/usr/local/bin/installer b/nrelease/installer/usr/local/bin/installer index ed3275e3a5..c8a35d5de2 100755 --- a/nrelease/installer/usr/local/bin/installer +++ b/nrelease/installer/usr/local/bin/installer @@ -1,8 +1,8 @@ #!/bin/sh # installer - start installer frontend and backend as per pfi config. -# $Id: installer,v 1.17 2005/02/06 02:53:44 cpressey Exp $ -# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.8 2005/03/20 03:54:01 cpressey Exp $ +# $Id: installer,v 1.20 2005/04/13 03:32:16 cpressey Exp $ +# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.9 2005/08/02 17:02:59 cpressey Exp $ ### SUBS ### @@ -10,8 +10,7 @@ background_backend() { RENDEZVOUS=$1 TRANSPORT=$2 - cp /usr/local/sbin/dfuibe_installer /var/run/dfuibe_installer - /var/run/dfuibe_installer -r $RENDEZVOUS -t $TRANSPORT >/dev/null 2>&1 + $pfi_backend -r $RENDEZVOUS -t $TRANSPORT >/dev/null 2>&1 RESULT=$? case "$RESULT" in 0) @@ -82,6 +81,10 @@ installer_start() fi case "X$pfi_frontend" in + Xqt) + $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport + RESULT=$? + ;; Xcgi) $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport RESULT=$? -- 2.41.0