Merge pull request #513 from marineam/sudo

bump(sys-apps/baselayout): Adds sudo group, moves tmpfiles script
This commit is contained in:
Michael Marineau 2014-04-04 12:31:23 -07:00
commit 8f9dec177d
4 changed files with 4 additions and 40 deletions

View File

@ -9,7 +9,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~x86" KEYWORDS="~amd64 ~arm ~x86"
else else
CROS_WORKON_COMMIT="aa12816e0637a2ef800854e7343246d6a8177dd9" CROS_WORKON_COMMIT="45a1b989acecdeba5fd2499b56fdbe158ef367bb"
KEYWORDS="amd64 arm x86" KEYWORDS="amd64 arm x86"
fi fi
@ -169,9 +169,9 @@ src_install() {
fi fi
# Initialize /etc/passwd, group, and friends on boot. # Initialize /etc/passwd, group, and friends on boot.
bash "${FILESDIR}/coreos-tmpfiles" "${D}" || die bash "scripts/coreos-tmpfiles" "${D}" || die
dosbin "${FILESDIR}/coreos-tmpfiles" dosbin "scripts/coreos-tmpfiles"
systemd_dounit "${FILESDIR}/coreos-tmpfiles.service" systemd_dounit "scripts/coreos-tmpfiles.service"
systemd_enable_service sysinit.target coreos-tmpfiles.service systemd_enable_service sysinit.target coreos-tmpfiles.service
fi fi
} }

View File

@ -1,26 +0,0 @@
#!/bin/bash
# systemd-tmpfiles doesn't support skipping writing to files that already exist
# - copy the docker group to /etc because docker reads /etc/group directly
# - copy the core user to /etc so the passwd utility works correctly
# Inherit root from environment or command line
ROOT="${1:-$ROOT}"
BASE="${ROOT}/usr/share/baselayout"
# readable files
umask 022
if [[ ! -e "${ROOT}/etc/passwd" ]]; then
grep -e "^root:" -e "^core:" "${BASE}/passwd" > "${ROOT}/etc/passwd"
fi
if [[ ! -e "${ROOT}/etc/group" ]]; then
grep "^docker:" "${BASE}/group" > "${ROOT}/etc/group"
fi
# secure files
umask 027
if [[ ! -e "${ROOT}/etc/shadow" ]]; then
grep -e "^root:" -e "^core:" "${BASE}/shadow" > "${ROOT}/etc/shadow"
fi
if [[ ! -e "${ROOT}/etc/gshadow" ]]; then
grep "^docker:" "${BASE}/gshadow" > "${ROOT}/etc/gshadow"
fi

View File

@ -1,10 +0,0 @@
[Unit]
Description=Create missing system files
DefaultDependencies=no
After=local-fs.target
Before=sysinit.target
ConditionPathIsReadWrite=/etc
[Service]
Type=oneshot
ExecStart=/usr/sbin/coreos-tmpfiles