mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-22 08:08:29 +03:00
check if ssh keys variable is populated after parsing file (#148)
This commit is contained in:
parent
0878853cbc
commit
e01d2272dc
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ makeConf() {
|
|||
for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do
|
||||
[[ -r "$trypath" ]] \
|
||||
&& keys=$(sed -E 's/^.*((ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \
|
||||
&& [[ ! -z "$keys" ]] \
|
||||
&& break
|
||||
done
|
||||
local network_import=""
|
||||
|
|
Loading…
Reference in a new issue