summaryrefslogtreecommitdiffstats
path: root/release/tools
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2015-06-08 15:08:09 +0000
committergjb <gjb@FreeBSD.org>2015-06-08 15:08:09 +0000
commit03ac71f0b1b8f27e6c133b2c076538496dd1c5de (patch)
treec17135745b91026a1e2a4d5dc0a397525cf689bc /release/tools
parent8b8722aae0e9460a69e11ee0d01a12e2248e98dd (diff)
downloadFreeBSD-src-03ac71f0b1b8f27e6c133b2c076538496dd1c5de.zip
FreeBSD-src-03ac71f0b1b8f27e6c133b2c076538496dd1c5de.tar.gz
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
Diffstat (limited to 'release/tools')
-rw-r--r--release/tools/arm.subr13
1 files changed, 9 insertions, 4 deletions
diff --git a/release/tools/arm.subr b/release/tools/arm.subr
index 5cc61e3..628a8be 100644
--- a/release/tools/arm.subr
+++ b/release/tools/arm.subr
@@ -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
}
OpenPOWER on IntegriCloud