PERFORCE change 80034 for review
soc-andrew
soc-andrew at FreeBSD.org
Tue Jul 12 04:17:22 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=80034
Change 80034 by soc-andrew at 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;
}
More information about the p4-projects
mailing list