Check if the network is up before attempting to install pkgin. If not,

configure it.
This commit is contained in:
riz 2012-04-30 19:05:29 +00:00
parent 748ee23b9d
commit 29b07b45cc

View File

@ -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,