mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
fix(coreos-base/coreos-init): Move daemon setup to init package.
Previously coreos-base handled some sshd and dhcpcd and lacked the dependencies required to make enabling systemd units work. coreos-init is a better place for that and has a proper source package so fewer files are needed in the portage overlay.
This commit is contained in:
parent
0148e57e73
commit
504217295c
@ -118,12 +118,6 @@ src_install() {
|
||||
# Insert empty fstab
|
||||
doins "${FILESDIR}"/fstab
|
||||
|
||||
# Enable dhcpcd by default
|
||||
# TODO(ifup): this doesn't work
|
||||
# systemd_enable_service multi-user.target dhcpcd.service
|
||||
dodir /usr/lib/systemd/system/
|
||||
dosym ../dhcpcd.service /usr/lib/systemd/system/multi-user.target.wants/dhcpcd.service
|
||||
|
||||
# Symlink /etc/localtime to something on the stateful partition, which we
|
||||
# can then change around at runtime.
|
||||
dosym /var/lib/timezone/localtime /etc/localtime || die
|
||||
@ -139,11 +133,6 @@ src_install() {
|
||||
#dosym /usr/bin/vim /usr/libexec/editor || die
|
||||
#dosym /bin/more /usr/libexec/pager || die
|
||||
|
||||
# Install our custom ssh config settings.
|
||||
insinto /etc/ssh
|
||||
doins "${FILESDIR}"/ssh{,d}_config
|
||||
fperms 600 /etc/ssh/sshd_config
|
||||
|
||||
# Custom login shell snippets.
|
||||
insinto /etc/profile.d
|
||||
doins "${FILESDIR}"/cursor.sh
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
Host *
|
||||
UserKnownHostsFile /home/core/user/.ssh/known_hosts
|
||||
@ -1,13 +0,0 @@
|
||||
# Force protocol v2 only
|
||||
Protocol 2
|
||||
|
||||
# /etc is read-only. Fetch keys from stateful partition
|
||||
# Not using v1, so no v1 key
|
||||
HostKey /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key
|
||||
HostKey /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key
|
||||
|
||||
PasswordAuthentication no
|
||||
UsePAM yes
|
||||
PrintMotd no
|
||||
PrintLastLog no
|
||||
Subsystem sftp internal-sftp
|
||||
@ -3,7 +3,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="4"
|
||||
CROS_WORKON_COMMIT="ad419999ea478bb60867e9e14f01197b928a5c73"
|
||||
CROS_WORKON_COMMIT="340361e54109536b235948dd8929768513feba30"
|
||||
CROS_WORKON_PROJECT="coreos/init"
|
||||
CROS_WORKON_LOCALNAME="init"
|
||||
|
||||
@ -18,8 +18,13 @@ SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE="nfs"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
# Daemons we enable here must installed during build/install in addition to
|
||||
# during runtime so the systemd unit enable step works.
|
||||
DEPEND="
|
||||
net-misc/dhcpcd
|
||||
net-misc/openssh
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
sys-block/parted
|
||||
sys-apps/gptfdisk
|
||||
sys-apps/systemd
|
||||
@ -32,12 +37,18 @@ src_install() {
|
||||
doexe "${script}"
|
||||
done
|
||||
|
||||
# Install our custom ssh config settings.
|
||||
insinto /etc/ssh
|
||||
doins configs/ssh{,d}_config
|
||||
fperms 600 /etc/ssh/sshd_config
|
||||
|
||||
# Install all units, enable the higher-level services
|
||||
for unit in systemd/*; do
|
||||
systemd_dounit "${unit}"
|
||||
done
|
||||
|
||||
systemd_enable_service basic.target coreos-startup.service
|
||||
systemd_enable_service multi-user.target update-engine.service
|
||||
systemd_enable_service multi-user.target dhcpcd.service
|
||||
systemd_enable_service multi-user.target sshd.socket
|
||||
systemd_enable_service multi-user.target update-engine.service
|
||||
}
|
||||
|
||||
@ -17,8 +17,13 @@ SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="nfs"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="
|
||||
# Daemons we enable here must installed during build/install in addition to
|
||||
# during runtime so the systemd unit enable step works.
|
||||
DEPEND="
|
||||
net-misc/dhcpcd
|
||||
net-misc/openssh
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
sys-block/parted
|
||||
sys-apps/gptfdisk
|
||||
sys-apps/systemd
|
||||
@ -31,12 +36,18 @@ src_install() {
|
||||
doexe "${script}"
|
||||
done
|
||||
|
||||
# Install our custom ssh config settings.
|
||||
insinto /etc/ssh
|
||||
doins configs/ssh{,d}_config
|
||||
fperms 600 /etc/ssh/sshd_config
|
||||
|
||||
# Install all units, enable the higher-level services
|
||||
for unit in systemd/*; do
|
||||
systemd_dounit "${unit}"
|
||||
done
|
||||
|
||||
systemd_enable_service basic.target coreos-startup.service
|
||||
systemd_enable_service multi-user.target update-engine.service
|
||||
systemd_enable_service multi-user.target dhcpcd.service
|
||||
systemd_enable_service multi-user.target sshd.socket
|
||||
systemd_enable_service multi-user.target update-engine.service
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user