From owner-svn-src-all@FreeBSD.ORG Mon Jun 8 15:08:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6269D68C; Mon, 8 Jun 2015 15:08:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 367CC17AB; Mon, 8 Jun 2015 15:08:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58F8A5s062685; Mon, 8 Jun 2015 15:08:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58F8Add062684; Mon, 8 Jun 2015 15:08:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506081508.t58F8Add062684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Jun 2015 15:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284154 - stable/10/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 15:08:10 -0000 Author: gjb Date: Mon Jun 8 15:08:09 2015 New Revision: 284154 URL: https://svnweb.freebsd.org/changeset/base/284154 Log: MFC r283894, r283895, r283913, r284004, r284010: r283894 [1]: Disable arm_create_user(). r283895 [1]: Re-enable arm_create_user(), and pass the '-V DESTDIR/etc' to pw(8) to set the correct /etc directory for the user/group files. r283913: Pass the '-b' argument to pw(8) so the '/home' directory is created in the correct place. r284004: Make sure /home exists within the DESTDIR before creating the 'freebsd' user account. r284010 [2]: Work around a potential bug in pw(8) when '-m' is specified. [1] For recording merge history only. [2] This commit post-dates the pw(8) '-R' addition in head/, which is needed for conflict resolution from r284004. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Mon Jun 8 14:06:47 2015 (r284153) +++ stable/10/release/tools/arm.subr Mon Jun 8 15:08:09 2015 (r284154) @@ -80,11 +80,16 @@ arm_create_disk() { arm_create_user() { # Create a default user account 'freebsd' with the password 'freebsd', # and set the default password for the 'root' user to 'root'. - chroot ${CHROOTDIR} /usr/sbin/pw groupadd freebsd -g 1001 - chroot ${CHROOTDIR} /usr/sbin/pw useradd freebsd \ + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + groupadd freebsd -g 1001 + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home/freebsd + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ - -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' - chroot ${CHROOTDIR} /usr/sbin/pw usermod root -w yes + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' \ + -b "${DESTDIR}/home" + chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + usermod root -w yes return 0 }