summaryrefslogtreecommitdiff
path: root/get-authorized-keys
blob: 8c24017255a2c85d9380c802b44909a5176e715b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

set -euo pipefail

if [ ! -e /root/.ssh/authorized_keys ]; then
	if mount -r LABEL=v-i-config /mnt; then
		if [ -e /mnt/authorized_keys ]; then
			cp /mnt/authorized_keys /root/.ssh/authorized_keys
		fi
		umount /mnt
	fi
fi