From 8ec67f6baf7af6db7fb411caec4d3ddab198a5b9 Mon Sep 17 00:00:00 2001 From: pvizeli Date: Thu, 23 Mar 2017 16:06:53 +0100 Subject: [PATCH] bugfix v2 --- .../start-resin-supervisor | 1 + .../docker-resin-supervisor-disk/supervisor.conf | 2 +- .../dropbear/files/sync-authorized-keys.service | 2 +- .../dropbear/files/sync-authorized-keys.sh | 12 ++++++------ 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor index be33e699a..8ba3b16b8 100644 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor +++ b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor @@ -1,6 +1,7 @@ #!/bin/sh -e source /usr/sbin/resin-vars +source /etc/resin-supervisor/supervisor.conf SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' $SUPERVISOR_IMAGE) SUPERVISOR_CONTAINER_IMAGE_ID=$(docker inspect --format='{{.Image}}' resin_supervisor || echo "") diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf index 5e555dda0..8a04556b0 100644 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf +++ b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf @@ -1,4 +1,4 @@ -SUPERVISOR_IMAGE=@SUPERVISOR_REPOSITORY@ +SUPERVISOR_IMAGE=@SUPERVISOR_REPOSITORY@ SUPERVISOR_TAG=@SUPERVISOR_TAG@ LED_FILE=@LED_FILE@ MACHINE=@MACHINE@ diff --git a/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.service b/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.service index 1aaed02fb..2804f386d 100644 --- a/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.service +++ b/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.service @@ -1,5 +1,5 @@ [Unit] -Description=SSH authorized_keys state bind mount +Description=SSH authorized_keys sync Requires=home-root-.ssh.mount mnt-boot.mount After=home-root-.ssh.mount mnt-boot.mount Before=etc-dropbear.mount diff --git a/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.sh b/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.sh index 5a28814d2..51b229b90 100644 --- a/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.sh +++ b/meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/bin/bash -BOOT_SSH_KEY = /mnt/boot/authorized_keys -HOME_SSH_KEY = /home/root/.ssh/authorized_keys +BOOT_SSH_KEY=/mnt/boot/authorized_keys +HOME_SSH_KEY=/home/root/.ssh/authorized_keys -if [ -f BOOT_SSH_KEY ]; then - mv BOOT_SSH_KEY HOME_SSH_KEY - chmod 0650 HOME_SSH_KEY +if [ -f $BOOT_SSH_KEY ]; then + mv $BOOT_SSH_KEY $HOME_SSH_KEY + chmod 0600 $HOME_SSH_KEY fi