From dbf55f9e799a0ef1be4030bc8ae8520c8a1a41c9 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Mon, 10 Aug 2015 15:50:31 +0200 Subject: [ssh-auth-keys] Modified systemd-ssh_auth_keys to not exit when missing AUTH_KEYS_DIR, also mkdir onto $AUTH_KEYS_FILE's directory. --- .../ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'remote/modules/ssh-auth-keys/data/opt/openslx/scripts') diff --git a/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys b/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys index 08ad7d2c..9a64b83a 100755 --- a/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys +++ b/remote/modules/ssh-auth-keys/data/opt/openslx/scripts/systemd-ssh_auth_keys @@ -4,7 +4,9 @@ AUTH_KEYS_DIR="/root/.ssh/authorized_keys.d/" AUTH_KEYS_FILE="/root/.ssh/authorized_keys" # do we even have the directory? -[ ! -d "$AUTH_KEYS_DIR" ] && echo "No such directory: $AUTH_KEYS_DIR" && exit 1 +[ ! -d "$AUTH_KEYS_DIR" ] && echo "No such directory: $AUTH_KEYS_DIR" && exit 0 + +mkdir -m 700 $(dirname "$AUTH_KEYS_FILE") 2>/dev/null # ok, lets cat them in the real file for KEY in "$AUTH_KEYS_DIR"/* ; do -- cgit v1.2.3-55-g7522