baselayout: create default passwd/group files in the SDK

This has always been done in the past by scripts/sdk_lib/make_chroot.sh
and is required to support adding new users and groups (the add commands
will not create these files themselves). Most users ebuilds add on the
fly are covered by our static group file here so this doesn't come up.
However dnsmasq was just added to the SDK and its ebuild adds a dnsmasq
user. We have no need for that user in production CoreOS images so no
point in adding it to the static list.

Without this `bootstrap_sdk` fails. Nothing else really changes.
This commit is contained in:
Michael Marineau 2015-02-25 18:13:49 -08:00
parent ecf2af56ff
commit c3a6b33995
2 changed files with 5 additions and 0 deletions

View File

@ -181,4 +181,9 @@ pkg_postinst() {
ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}" ln -sfT "${USR_SYMS[$sym]}" "${ROOT}/usr/lib/debug/${sym}"
done done
fi fi
# The default passwd/group files must exist in the SDK for some ebuilds
if use cros_host; then
touch "${ROOT}/etc/"{group,gshadow,passwd,shadow}
chmod 640 "${ROOT}/etc/"{gshadow,shadow}
fi
} }