From 8834230cb30ef60dee514940d8f1b539f8a41873 Mon Sep 17 00:00:00 2001 From: accel Date: Wed, 9 Feb 2022 23:01:14 +0300 Subject: [PATCH] safe config names --- zssh.funcs.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zssh.funcs.zsh b/zssh.funcs.zsh index 6f88aa0..ce30fb8 100644 --- a/zssh.funcs.zsh +++ b/zssh.funcs.zsh @@ -160,8 +160,10 @@ function zssh_publish_configs() zshlibs_log zssh_server "generating access configs for parties …" for sshmatch in ${(k)zssh_host_config_accesses} do - zshlibs_log zssh_server "generating our server access config '$(zssh_host_info -E ${sshmatch})'" - zssh_generate_hostaccessconfig $sshmatch > "$(zssh_host_info -E ${sshmatch})" + config_filename="$(zssh_host_info -E ${sshmatch})" + config_filename=${config_filename//:/_} + zshlibs_log zssh_server "generating our server access config '${config_filename}'" + zssh_generate_hostaccessconfig $sshmatch > "${config_filename}" done zshlibs_log zssh_server "updating mtime for $(zssh_host_info -C)" touch "$(zssh_host_info -C)"