change to resin style

This commit is contained in:
Pascal Vizeli 2017-03-23 23:07:54 +01:00
parent 1d17819311
commit 036f375f06
3 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \ SRC_URI += " \
file://sync-authorized-keys.sh \ file://sync-authorized-keys \
file://sync-authorized-keys.service \ file://sync-authorized-keys.service \
" "
@ -17,7 +17,7 @@ do_install_append() {
install -d ${D}/home/root/.ssh install -d ${D}/home/root/.ssh
install -d ${D}${bindir} install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/sync-authorized-keys.sh ${D}${bindir} install -m 0755 ${WORKDIR}/sync-authorized-keys ${D}${bindir}
if [ "${RESIN_CONNECTABLE_ENABLE_SERVICES}" = "1" ]; then if [ "${RESIN_CONNECTABLE_ENABLE_SERVICES}" = "1" ]; then
rm -fr ${D}${localstatedir}/lib/dropbear/ rm -fr ${D}${localstatedir}/lib/dropbear/

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
BOOT_SSH_KEY=/mnt/boot/authorized_keys BOOT_SSH_KEY=/mnt/boot/authorized_keys
HOME_SSH_KEY=/home/root/.ssh/authorized_keys HOME_SSH_KEY=/home/root/.ssh/authorized_keys

View File

@ -6,7 +6,8 @@ Before=etc-dropbear.mount
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=@BASE_BINDIR@/bash @BINDIR@/sync-authorized-keys.sh RemainAfterExit=yes
ExecStart=@BASE_BINDIR@/bash @BINDIR@/sync-authorized-keys
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target