From 739c65c54cb0e957df5e9b76f93fb02554e5cac3 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 4 May 2022 23:52:30 +0100 Subject: moved everything to new file formatting --- extra/openrc/firstboot.initd | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 extra/openrc/firstboot.initd (limited to 'extra/openrc/firstboot.initd') diff --git a/extra/openrc/firstboot.initd b/extra/openrc/firstboot.initd deleted file mode 100644 index eac4ef8..0000000 --- a/extra/openrc/firstboot.initd +++ /dev/null @@ -1,34 +0,0 @@ -#!/sbin/openrc-run - -# The first boot init service - -# read kernel options -init_KOPT() { - eval "set -- $(cat /proc/cmdline 2>/dev/null)" - for opt; do - case "$opt" in - ssh_*=*) - eval "KOPT_${opt%%=*}='${opt#*=}'" ;; - esac - done -} - -start() { - rm -f /etc/runlevels/*/$RC_SVCNAME - init_KOPT - local rc=0 - ebegin "Starting ${RC_SVCNAME}" - if [ -n "$KOPT_ssh_key" ] && [ ! -f "/root/.ssh/authorized_keys" ]; then - einfo "Fetching ssh keys" - mkdir -pm 700 /root/.ssh - checkpath -fm 0600 /root/.ssh/authorized_keys - case "$KOPT_ssh_key" in - https://*|ftps://*|http://*) - wget -q "$KOPT_ssh_key" -O /root/.ssh/authorized_keys - rc=$?;; - *) echo "$KOPT_ssh_key" > /root/.ssh/authorized_keys;; - esac - fi - eend $rc -} - -- cgit v1.2.1