Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layering hostname/hosts #5

Merged
merged 3 commits into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildroot-external/package/hassio/builder/hostapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ mkdir -p /mnt/supervisor
mkdir -p /mnt/cli

# Run dockerd
dockerd -s overlay2 -g /mnt/docker 2> /dev/null &
dockerd -s overlay2 -g /mnt/docker &
DOCKER_PID=$!

DOCKER_COUNT=0
until docker info >/dev/null 2>&1; do
DOCKER_COUNT=0
if [ ${DOCKER_COUNT} -gt 30 ]; then
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
C /mnt/overlay/etc/hostname - - - - /etc/hostname
C /mnt/overlay/etc/hosts - - - - /etc/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Hostname persistent configuration
Requires=mnt-overlay.mount
After=mnt-overlay.mount systemd-tmpfiles-setup.service
Before=network.target

[Mount]
What=/mnt/overlay/etc/hostname
Where=/etc/hostname
Type=none
Options=bind

[Install]
WantedBy=hassio-bind.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Hosts persistent configuration
Requires=mnt-overlay.mount
After=mnt-overlay.mount systemd-tmpfiles-setup.service
Before=network.target

[Mount]
What=/mnt/overlay/etc/hosts
Where=/etc/hosts
Type=none
Options=bind

[Install]
WantedBy=hassio-bind.target
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Hassio overlay partition
DefaultDependencies=no
Before=umount.target
Before=umount.target systemd-tmpfiles-setup.service
Conflicts=umount.target

[Mount]
Expand Down
1 change: 1 addition & 0 deletions scripts/enter.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
modprobe overlayfs
docker build -t hassbuildroot .
docker run -it --rm --privileged -v "$(pwd):/build" hassbuildroot bash