mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
Merge pull request #83 from polvi/add-oem
feat(coreos-base/oem): add the initial oem partition support
This commit is contained in:
commit
b8c19881ae
@ -151,6 +151,7 @@ RDEPEND="${RDEPEND}
|
|||||||
app-emulation/docker
|
app-emulation/docker
|
||||||
app-misc/ca-certificates
|
app-misc/ca-certificates
|
||||||
virtual/udev
|
virtual/udev
|
||||||
|
coreos-base/oem-service
|
||||||
"
|
"
|
||||||
|
|
||||||
# TODO(dianders):
|
# TODO(dianders):
|
||||||
|
@ -106,6 +106,7 @@ RDEPEND="${RDEPEND}
|
|||||||
dev-libs/protobuf-c
|
dev-libs/protobuf-c
|
||||||
app-text/asciidoc
|
app-text/asciidoc
|
||||||
app-text/xmlto
|
app-text/xmlto
|
||||||
|
sys-apps/gptfdisk
|
||||||
"
|
"
|
||||||
|
|
||||||
# Host dependencies that create usernames/groups we need to pull over to target.
|
# Host dependencies that create usernames/groups we need to pull over to target.
|
||||||
|
16
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/install-ec2-key.sh
vendored
Executable file
16
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/install-ec2-key.sh
vendored
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
USER_DIR="/home/core/user"
|
||||||
|
|
||||||
|
if [ ! -d ${USER_DIR}/.ssh ] ; then
|
||||||
|
mkdir -p ${USER_DIR}/.ssh
|
||||||
|
chmod 700 ${USER_DIR}/.ssh
|
||||||
|
fi
|
||||||
|
# Fetch public key using HTTP
|
||||||
|
curl -s http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /tmp/my-key
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
cat /tmp/my-key >> ${USER_DIR}/.ssh/authorized_keys
|
||||||
|
chmod 700 ${USER_DIR}/.ssh/authorized_keys
|
||||||
|
rm /tmp/my-key
|
||||||
|
fi
|
||||||
|
chown -R core: $USER_DIR/.ssh
|
3
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/run.sh
vendored
Executable file
3
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/run.sh
vendored
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/usr/share/oem/usr/bin/install-ec2-key.sh
|
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/oem-ami-0.0.1-r4.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/oem-ami-0.0.1-r4.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
oem-ami-0.0.1.ebuild
|
24
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/oem-ami-0.0.1.ebuild
vendored
Normal file
24
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/oem-ami-0.0.1.ebuild
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||||
|
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header:$
|
||||||
|
#
|
||||||
|
|
||||||
|
EAPI=2
|
||||||
|
|
||||||
|
DESCRIPTION="oem suite for ami images"
|
||||||
|
HOMEPAGE=""
|
||||||
|
SRC_URI=""
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin "${FILESDIR}"/install-ec2-key.sh
|
||||||
|
|
||||||
|
exeinto "/"
|
||||||
|
doexe ${FILESDIR}/run.sh
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/run-oem.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
6
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/files/run-oem.sh
vendored
Executable file
6
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/files/run-oem.sh
vendored
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Each oem implemenation has a run.sh that boostraps its OEM process for systemd
|
||||||
|
OEM_EXEC="/usr/share/oem/run.sh"
|
||||||
|
|
||||||
|
[ -e $OEM_EXEC ] && exec $OEM_EXEC || exit 0
|
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/oem-service-0.0.1-r3.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/oem-service-0.0.1-r3.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
oem-service-0.0.1.ebuild
|
25
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/oem-service-0.0.1.ebuild
vendored
Normal file
25
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-service/oem-service-0.0.1.ebuild
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||||
|
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header:$
|
||||||
|
#
|
||||||
|
|
||||||
|
EAPI=2
|
||||||
|
inherit systemd
|
||||||
|
|
||||||
|
DESCRIPTION="oem service"
|
||||||
|
HOMEPAGE=""
|
||||||
|
SRC_URI=""
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64 x86"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin ${FILESDIR}/run-oem.sh
|
||||||
|
|
||||||
|
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||||
|
systemd_enable_service multi-user.target ${PN}.service
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user