Merge pull request #7 from marineam/boot-cleanup

Boot cleanup
This commit is contained in:
Brandon Philips 2013-06-06 15:31:08 -07:00
commit 5a84a6a841
12 changed files with 39 additions and 41 deletions

View File

@ -32,6 +32,7 @@ src_compile() {
src_install() {
dosbin ${S}/systemd-rest
keepdir /var/lib/${PN}
systemd_dounit "${FILESDIR}"/${PN}.service
systemd_enable_service multi-user.target ${PN}.service
}

View File

@ -31,6 +31,7 @@ src_compile() {
src_install() {
dosbin ${S}/systemd-rest
keepdir /var/lib/${PN}
systemd_dounit "${FILESDIR}"/${PN}.service
systemd_enable_service multi-user.target ${PN}.service
}

View File

@ -32,9 +32,8 @@ src_compile() {
src_install() {
dobin ${S}/bin/${PN}
dodir /var/lib/docker
dodir /var/lib/docker/graph
dodir /var/lib/docker/containers
keepdir /var/lib/${PN}/graph
keepdir /var/lib/${PN}/containers
systemd_dounit "${FILESDIR}"/${PN}.service
systemd_enable_service multi-user.target ${PN}.service
}

View File

@ -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

View File

@ -12,4 +12,3 @@
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/ROOT / ext3 defaults 0 0

View File

@ -1,2 +0,0 @@
Host *
UserKnownHostsFile /home/core/user/.ssh/known_hosts

View File

@ -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

View File

@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="ad419999ea478bb60867e9e14f01197b928a5c73"
CROS_WORKON_COMMIT="a7bd1042de90900b32b5fdbcb0a9562f152ae822"
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,19 @@ 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
# List of directories that should be recreated as needed
insinto /usr/lib/tmpfiles.d
newins configs/tmpfiles.conf zz-${PN}.conf
# 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 sshd.socket
systemd_enable_service multi-user.target coreos-startup.target
}

View File

@ -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,19 @@ 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
# List of directories that should be recreated as needed
insinto /usr/lib/tmpfiles.d
newins configs/tmpfiles.conf zz-${PN}.conf
# 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 sshd.socket
systemd_enable_service multi-user.target coreos-startup.target
}