Propagate http_proxy from installer to rc.firsttime

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Propagate http_proxy from installer to rc.firsttime

trondd-2
If you need to use a proxy to fetch the base sets, you'll likely need
it when you reboot in order for fw_update and syspatch to work.  It's
helpful for fw_update especially as it has a painfully long timeout.

If the http_proxy was set, simply pass it on to rc.firsttime so you
have it a reboot, too.

Tim.

Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1045
diff -u -p -r1.1045 install.sub
--- install.sub 1 Dec 2017 18:19:30 -0000 1.1045
+++ install.sub 7 Dec 2017 00:38:52 -0000
@@ -2724,6 +2724,10 @@ finish_up() {
  [[ $MODE == upgrade ]] &&
  echo "/usr/sbin/sysmerge -b" >>/mnt/etc/rc.sysmerge
 
+ # If a proxy was needed to fetch the sets, use it for fw_update and syspatch
+ [[ -n $http_proxy ]] &&
+ echo "export http_proxy=$http_proxy" >>/mnt/etc/rc.firsttime
+
  # Ensure that fw_update is run on reboot.
  echo "/usr/sbin/fw_update -v" >>/mnt/etc/rc.firsttime
 

Reply | Threaded
Open this post in threaded view
|

Re: Propagate http_proxy from installer to rc.firsttime

trondd-2
trondd <[hidden email]> wrote:

> If you need to use a proxy to fetch the base sets, you'll likely need
> it when you reboot in order for fw_update and syspatch to work.  It's
> helpful for fw_update especially as it has a painfully long timeout.
>
> If the http_proxy was set, simply pass it on to rc.firsttime so you
> have it a reboot, too.
>
> Tim.
>

Reposting with updated patch.  I didn't get a "no thanks" and I think
this makes sense, so putting it out there again.

Tim.


Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1052
diff -u -p -r1.1052 install.sub
--- install.sub 22 Dec 2017 19:41:49 -0000 1.1052
+++ install.sub 23 Dec 2017 23:18:52 -0000
@@ -2718,6 +2718,10 @@ finish_up() {
  [[ $MODE == upgrade ]] &&
  echo "/usr/sbin/sysmerge -b" >>/mnt/etc/rc.sysmerge
 
+ # If a proxy was needed to fetch the sets, use it for fw_update and syspatch
+ [[ -n $http_proxy ]] &&
+ echo "export http_proxy=$http_proxy" >>/mnt/etc/rc.firsttime
+
  # Ensure that fw_update is run on reboot.
  echo "/usr/sbin/fw_update -v" >>/mnt/etc/rc.firsttime