From owner-svn-src-stable-10@freebsd.org Sat Jul 4 00:43:24 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AC6899240E; Sat, 4 Jul 2015 00:43:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.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 EFA591E61; Sat, 4 Jul 2015 00:43:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t640hN8h057614; Sat, 4 Jul 2015 00:43:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t640hN0r057613; Sat, 4 Jul 2015 00:43:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201507040043.t640hN0r057613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 4 Jul 2015 00:43:23 +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: r285115 - 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-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2015 00:43:24 -0000 Author: gjb Date: Sat Jul 4 00:43:23 2015 New Revision: 285115 URL: https://svnweb.freebsd.org/changeset/base/285115 Log: MFC r284004 (parital): Use the pw(8) '-R' flag to change the relative root directory when creating operating within the DESTDIR. Approved by: re (marius) 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 Sat Jul 4 00:01:41 2015 (r285114) +++ stable/10/release/tools/arm.subr Sat Jul 4 00:43:23 2015 (r285115) @@ -80,15 +80,14 @@ 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 -V ${DESTDIR}/etc \ + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ groupadd freebsd -g 1001 chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/home/freebsd - chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ useradd freebsd \ -m -M 0755 -w yes -n freebsd -u 1001 -g 1001 -G 0 \ - -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' \ - -b "${DESTDIR}/home" - chroot ${CHROOTDIR} /usr/sbin/pw -V ${DESTDIR}/etc \ + -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' + chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ usermod root -w yes return 0