Merge pull request #504 from marineam/pxe

PXE and related updates
This commit is contained in:
Michael Marineau 2014-04-01 11:57:07 -07:00
commit 773de477da
12 changed files with 29 additions and 83 deletions

View File

@ -36,8 +36,7 @@ src_compile() {
src_install() {
dobin ${S}/bin/coreos-cloudinit
systemd_dounit "${FILESDIR}"/coreos-cloudinit-oem.service
systemd_dounit "${FILESDIR}"/coreos-cloudinit@.service
systemd_dounit "${FILESDIR}"/cloud-config.target
systemd_enable_service default.target coreos-cloudinit-oem.service
systemd_enable_service default.target cloud-config.target
}

View File

@ -1,6 +1,9 @@
[Unit]
Requires=coreos-cloudinit-oem.service
After=coreos-cloudinit-oem.service
# Load OEM and coreos-install cloud-configs by default
Requires=coreos-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service
After=coreos-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service
Requires=coreos-cloudinit@var-lib-coreos\x2dinstall-user_data.service
After=coreos-cloudinit@var-lib-coreos\x2dinstall-user_data.service
[Install]
WantedBy=multi-user.target

View File

@ -1,14 +0,0 @@
[Unit]
Description=coreos-cloudinit for /usr/share/oem/cloud-config.yml
Requires=dbus.service
After=dbus.service
RequiresMountsFor=/usr/share/oem
ConditionPathExists=/usr/share/oem/cloud-config.yml
[Service]
Type=oneshot
ExecStart=/usr/bin/coreos-cloudinit --from-file=/usr/share/oem/cloud-config.yml
[Install]
WantedBy=multi-user.target
WantedBy=cloudinit.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Load cloud-config from %f
Requires=dbus.service
After=dbus.service
RequiresMountsFor=%f
ConditionFileNotEmpty=%f
[Service]
Type=oneshot
ExecStart=/usr/bin/coreos-cloudinit --from-file=%f
[Install]
WantedBy=cloud-config.target

View File

@ -10,7 +10,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~x86"
else
CROS_WORKON_COMMIT="79c21da232a77b1b323eb165e73bb448e8bc5241"
CROS_WORKON_COMMIT="907417baab1a0701168ae4d5be8b5da456e719f2"
KEYWORDS="amd64 arm x86"
fi

View File

@ -1,7 +0,0 @@
[Unit]
PartOf=update-engine.service
Description=Update Engine Reboot Manager
[Service]
ExecStart=/usr/sbin/update_engine_reboot_manager
Restart=always

View File

@ -1,17 +0,0 @@
[Unit]
Description=Update Engine
ConditionVirtualization=!container
ConditionKernelCommandLine=!coreos.diskless
ConditionKernelCommandLine=!coreos.statediskonly
Wants=update-engine-reboot-manager.service
[Service]
Type=dbus
BusName=org.chromium.UpdateEngine
ExecStart=/usr/sbin/update_engine -foreground -logtostderr -no_connection_manager
BlockIOWeight=100
Restart=always
RestartSec=30
[Install]
WantedBy=default.target

View File

@ -1,23 +0,0 @@
#!/bin/bash
# Copyright (c) 2013 The CoreOS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO: Make this a service in Go that coordinates between a host group
interface=org.chromium.UpdateEngineInterface
member=StatusUpdate
reboot_tasks() {
sync
echo "$0 rebooting machine after update" > /dev/kmsg
shutdown -r -t 60
}
filter="type=signal,interface='$interface',member='$member'"
dbus-monitor --system ${filter} |
while read -r line; do
echo $line | grep -q "UPDATE_STATUS_UPDATED_NEED_REBOOT" && reboot_tasks
done

View File

@ -8,7 +8,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~x86"
else
CROS_WORKON_COMMIT="dba8a748e1da4d0bb85d2a0232b101906da80ae5"
CROS_WORKON_COMMIT="f084f56dec6aeb1259e901112f3b9461e265883f"
KEYWORDS="amd64 arm x86"
fi
@ -80,11 +80,9 @@ src_test() {
}
src_install() {
dosbin "${FILESDIR}"/update_engine_reboot_manager
systemd_dounit "${FILESDIR}"/update-engine-reboot-manager.service
systemd_enable_service multi-user.target update-engine-reboot-manager.service
dosbin update_engine
dosbin systemd/update_engine_reboot_manager
dosbin systemd/update_engine_stub
dobin update_engine_client
dosbin coreos-postinst
@ -97,26 +95,20 @@ src_install() {
use delta_generator && dobin delta_generator
systemd_dounit "${FILESDIR}"/update-engine.service
systemd_dounit systemd/update-engine.service
systemd_dounit systemd/update-engine-reboot-manager.service
systemd_dounit systemd/update-engine-stub.service
systemd_dounit systemd/update-engine-stub.timer
systemd_enable_service multi-user.target update-engine.service
systemd_enable_service multi-user.target update-engine-stub.timer
insinto /usr/share/dbus-1/services
doins org.chromium.UpdateEngine.service
insinto /etc/dbus-1/system.d
insinto /usr/share/dbus-1/system.d
doins UpdateEngine.conf
insinto /lib/udev/rules.d
doins 99-gpio-dutflag.rules
insinto /usr/include/chromeos/update_engine
doins update_engine.dbusserver.h
doins update_engine.dbusclient.h
# PXE
exeinto /usr/lib/coreos/
doexe "${S}"/pxe/pxe_update_engine
systemd_dounit "${S}"/pxe/pxe-update-engine.service
systemd_dounit "${S}"/pxe/pxe-update-engine.timer
systemd_enable_service default.target pxe-update-engine.timer
}