mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 21:11:08 +02:00
Merge pull request #513 from marineam/sudo
bump(sys-apps/baselayout): Adds sudo group, moves tmpfiles script
This commit is contained in:
commit
8f9dec177d
@ -9,7 +9,7 @@ CROS_WORKON_REPO="git://github.com"
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
else
|
||||
CROS_WORKON_COMMIT="aa12816e0637a2ef800854e7343246d6a8177dd9"
|
||||
CROS_WORKON_COMMIT="45a1b989acecdeba5fd2499b56fdbe158ef367bb"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
fi
|
||||
|
||||
@ -169,9 +169,9 @@ src_install() {
|
||||
fi
|
||||
|
||||
# Initialize /etc/passwd, group, and friends on boot.
|
||||
bash "${FILESDIR}/coreos-tmpfiles" "${D}" || die
|
||||
dosbin "${FILESDIR}/coreos-tmpfiles"
|
||||
systemd_dounit "${FILESDIR}/coreos-tmpfiles.service"
|
||||
bash "scripts/coreos-tmpfiles" "${D}" || die
|
||||
dosbin "scripts/coreos-tmpfiles"
|
||||
systemd_dounit "scripts/coreos-tmpfiles.service"
|
||||
systemd_enable_service sysinit.target coreos-tmpfiles.service
|
||||
fi
|
||||
}
|
||||
|
@ -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
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user