From 29b07b45cc57e5cf5eb3b5d8d10480f4e104ab4e Mon Sep 17 00:00:00 2001 From: riz Date: Mon, 30 Apr 2012 19:05:29 +0000 Subject: [PATCH] Check if the network is up before attempting to install pkgin. If not, configure it. --- distrib/utils/sysinst/configmenu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/distrib/utils/sysinst/configmenu.c b/distrib/utils/sysinst/configmenu.c index db0ee5c5f157..df90601ada6a 100644 --- a/distrib/utils/sysinst/configmenu.c +++ b/distrib/utils/sysinst/configmenu.c @@ -1,4 +1,4 @@ -/* $NetBSD: configmenu.c,v 1.2 2012/04/12 16:05:48 riz Exp $ */ +/* $NetBSD: configmenu.c,v 1.3 2012/04/30 19:05:29 riz Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -248,6 +248,13 @@ set_binpkg(struct menudesc *menu, void *arg) char pattern[STRSIZE]; + /* binary pkg config requires network at this point, so if + it's not already configured, do it. */ + if (network_up == 0) { + if (config_network()) + mnt_net_config(); + } + process_menu(MENU_binpkg, NULL); make_url(pkgpath, &pkg, pkg_dir); if ( run_program(RUN_DISPLAY | RUN_PROGRESS | RUN_CHROOT,