Skip to content

Commit

Permalink
ncm-metaconfig: ssh: register sshd test from stdin command
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird committed Jun 11, 2020
1 parent 8472d81 commit 55b429e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ncm-metaconfig/src/main/metaconfig/ssh/pan/server_config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ include 'metaconfig/ssh/schema';

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

prefix "/software/components/metaconfig/services/{/etc/ssh/sshd_config}";
prefix "/software/components/metaconfig";

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

prefix "services/{/etc/ssh/sshd_config}";
"module" = "ssh/server";
"commands/test" = "/usr/sbin/sshd -t -f /dev/stdin";
"actions/test" = "sshd_test_stdin";
"daemons/sshd" = "restart";
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
object template server_config;

# add this to test the actions/commands to trigger the main metaconfig bind
function pkg_repl = { null; };
include 'components/metaconfig/config';
# remove the dependencies
'/software/components/metaconfig/dependencies' = null;

include 'metaconfig/ssh/server_config';

prefix "/software/components/metaconfig/services/{/etc/ssh/sshd_config}/contents";
Expand Down

0 comments on commit 55b429e

Please sign in to comment.