Date: Tue, 12 Jul 2005 04:17:20 GMT From: soc-andrew <soc-andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 80034 for review Message-ID: <200507120417.j6C4HKlD018491@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/utsname.h> + +#include <limits.h> #include <string.h> #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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507120417.j6C4HKlD018491>