Skip to content

Commit

Permalink
ncm-metaconfig: ssh: replace final with bind magic to fix sshd_test_s…
Browse files Browse the repository at this point in the history
…tdin
  • Loading branch information
stdweird committed Oct 28, 2020
1 parent 5becb7c commit b1f01f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ncm-metaconfig/src/main/metaconfig/ssh/pan/server_config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ include 'metaconfig/ssh/schema';

bind "/software/components/metaconfig/services/{/etc/ssh/sshd_config}/contents" = sshd_config_file;

prefix "/software/components/metaconfig";
# since final locks the whole path, bind it to a fix value and set it as default too
# TODO: support in compiler
bind "/software/components/metaconfig/commands/sshd_test_stdin" =
string = "/usr/sbin/sshd -t -f /dev/stdin" with SELF == "/usr/sbin/sshd -t -f /dev/stdin";

final "commands/sshd_test_stdin" = "/usr/sbin/sshd -t -f /dev/stdin";

prefix "services/{/etc/ssh/sshd_config}";
prefix "/software/components/metaconfig/services/{/etc/ssh/sshd_config}";
"module" = "ssh/server";
"actions/test" = "sshd_test_stdin";
"daemons/sshd" = "restart";

0 comments on commit b1f01f8

Please sign in to comment.