From owner-p4-projects@FreeBSD.ORG Sun Jul 31 11:42:25 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 CF8D816A421; Sun, 31 Jul 2005 11:42:24 +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 8B2F116A41F for ; Sun, 31 Jul 2005 11:42:24 +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 538B343D45 for ; Sun, 31 Jul 2005 11:42:24 +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 j6VBgOpr059738 for ; Sun, 31 Jul 2005 11:42:24 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6VBgN8T059735 for perforce@freebsd.org; Sun, 31 Jul 2005 11:42:23 GMT (envelope-from soc-andrew@freebsd.org) Date: Sun, 31 Jul 2005 11:42:23 GMT Message-Id: <200507311142.j6VBgN8T059735@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 81232 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: Sun, 31 Jul 2005 11:42:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=81232 Change 81232 by soc-andrew@soc-andrew_serv on 2005/07/31 11:41:52 Fix dhclient on Install CD Use the mtree files to create/correct directories Remove the local dist as it dosn't exist Inform the user if a dist fails to install Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/release/Makefile#12 edit .. //depot/projects/soc2005/bsdinstaller/src/share/bsdinstaller/cmdnames.conf#2 edit .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/extra_flow.c#3 edit .. //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#5 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/release/Makefile#12 (text+ko) ==== @@ -790,6 +790,8 @@ cp ${.CURDIR}/bsdinstaller/ttys.${TARGET_ARCH} \ ${RD}/bsdinstaller/root/etc/ttys; \ fi ) + @mkdir -p ${RD}/bsdinstaller/root/var/db + @mkdir -p ${RD}/bsdinstaller/root/var/empty cp ${.CURDIR}/bsdinstaller/bsdinstaller_shell.sh ${RD}/bsdinstaller/root/ chmod u+x ${RD}/bsdinstaller/root/bsdinstaller_shell.sh cp ${.CURDIR}/bsdinstaller/bsdinstaller ${RD}/bsdinstaller/root/etc/rc.d/ ==== //depot/projects/soc2005/bsdinstaller/src/share/bsdinstaller/cmdnames.conf#2 (text+ko) ==== @@ -100,3 +100,7 @@ DMESG_BOOT=var/run/dmesg.boot INSTALLER_TEMP="/tmp/" + +# Extra FreeBSD Variables + +MTREE=usr/sbin/mtree ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/extra_flow.c#3 (text+ko) ==== @@ -63,7 +63,6 @@ #ifdef __amd64__ { "lib32", "32bit Libraries" }, #endif - { "local", "Local" }, { NULL, NULL } }; ==== //depot/projects/soc2005/bsdinstaller/src/usr.sbin/bsdinstaller/backend/fn_install_freebsd.c#5 (text+ko) ==== @@ -62,6 +62,9 @@ #include #include +char *mtree_file[] = { "root", "var", "usr", "sendmail", NULL }; +char *mtree_dest[] = { "/", "/var", "/usr", "/", NULL }; + static int pre_install(struct i_fn_args *); static int do_install(struct i_fn_args *); static int post_install(struct i_fn_args *); @@ -165,6 +168,8 @@ char dist_name[32]; void *rv, *rk; size_t rv_len, rk_len; + int i; + struct commands *cmds; struct utsname name; uname(&name); @@ -184,12 +189,31 @@ if (rk_len < 32) dist_name[rk_len] = '\0'; - printf("+%s\n", dist_name); - dist_extract(a->c, dist_name); + if( dist_extract(a->c, dist_name) != 0) { + inform(a->c, _("Distribution %s was not installed."), dist_name); + return 0; + } aura_dict_next(a->dists); } i_log(a, ">>> Done"); + i_log(a, ""); + + cmds = commands_new(); + + for (i=0; mtree_file[i] != NULL; i++) { + /* Run "mtree -deU -f -p */ + command_add(cmds, "%s%s -deU -f %s/etc/mtree/BSD.%s.dist -p %smnt%s", + a->os_root, cmd_name(a, "MTREE"), + a->os_root, mtree_file[i], + a->os_root, mtree_dest[i]); + } + + if (!commands_execute(a, cmds)) { + inform(a->c, _("%s was not fully installed."), OPERATING_SYSTEM_NAME); + a->result = 0; + } + return 1; }