From owner-p4-projects@FreeBSD.ORG Tue Jul 12 04:17:21 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 57AC216A420; Tue, 12 Jul 2005 04:17:21 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2157016A41C for ; Tue, 12 Jul 2005 04:17:21 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E69DE43D45 for ; Tue, 12 Jul 2005 04:17:20 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6C4HKZY018494 for ; Tue, 12 Jul 2005 04:17:20 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6C4HKlD018491 for perforce@freebsd.org; Tue, 12 Jul 2005 04:17:20 GMT (envelope-from soc-andrew@freebsd.org) Date: Tue, 12 Jul 2005 04:17:20 GMT Message-Id: <200507120417.j6C4HKlD018491@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 80034 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2005 04:17:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=80034 Change 80034 by soc-andrew@soc-andrew_serv on 2005/07/12 04:16:30 Get the location of the distributions from uname(3) and add logging Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#2 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#2 (text+ko) ==== @@ -43,6 +43,9 @@ * It is based on the DragonFlyBSD version of fn_install_os */ +#include + +#include #include #ifdef ENABLE_NLS @@ -155,11 +158,19 @@ } int -do_install(struct i_fn_args *a __unused) +do_install(struct i_fn_args *a) { - dist_set_base("/usr/6.0-20050708-BSDINSTALLER"); + char base[PATH_MAX]; + struct utsname name; + uname(&name); + + snprintf(base, PATH_MAX, "/usr/%s", name.release); + + i_log(a, "<<< Extracting distrubutions from %s", base); + dist_set_base(base); dist_set_location("/mnt"); dist_extract("base"); + i_log(a, ">>> Done"); return 1; }