Module Name:    src
Committed By:   riz
Date:           Mon Apr 30 19:05:30 UTC 2012

Modified Files:
        src/distrib/utils/sysinst: configmenu.c

Log Message:
Check if the network is up before attempting to install pkgin.  If not,
configure it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/sysinst/configmenu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/sysinst/configmenu.c
diff -u src/distrib/utils/sysinst/configmenu.c:1.2 src/distrib/utils/sysinst/configmenu.c:1.3
--- src/distrib/utils/sysinst/configmenu.c:1.2	Thu Apr 12 16:05:48 2012
+++ src/distrib/utils/sysinst/configmenu.c	Mon Apr 30 19:05:29 2012
@@ -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 *
 
 	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,

Reply via email to