mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 15:36:29 +00:00
Layering hostname/hosts (#5)
* Layering hostname/hosts * Fix build * Use origin files on new overlay
This commit is contained in:
parent
5a6b8c5bbe
commit
e544c14d3d
@ -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
|
||||
|
@ -0,0 +1 @@
|
||||
/usr/lib/systemd/system/etc-hostname.mount
|
@ -0,0 +1 @@
|
||||
/usr/lib/systemd/system/etc-hosts.mount
|
@ -0,0 +1,2 @@
|
||||
C /mnt/overlay/etc/hostname - - - - /etc/hostname
|
||||
C /mnt/overlay/etc/hosts - - - - /etc/hosts
|
@ -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
|
@ -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
|
@ -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]
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
modprobe overlayfs
|
||||
docker build -t hassbuildroot .
|
||||
docker run -it --rm --privileged -v "$(pwd):/build" hassbuildroot bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user