Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #18343: #1632

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions techniques/system/common/1.0/failsafe.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ body common control
protocol_version => "2";
}

body agent control
{
&if(!INITIAL)&

@if feature(copyfrom_restrict_keys)
body agent control
{
copyfrom_restrict_keys => { "&POLICY_SERVER_KEY&" };
}
@endif
&endif&

}
&endif&

bundle common g
{
Expand Down
10 changes: 8 additions & 2 deletions techniques/system/common/1.0/update.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
bundle common rudder_update_conf
{
vars:
"policy_server_hash_file" => "${sys.workdir}/ppkeys/policy_server_hash";
"policy_server_hash_file" string => "${sys.workdir}/ppkeys/policy_server_hash";
known_policy_server::
"policy_server_hash" string => readfile("${policy_server_hash_file}");

Expand Down Expand Up @@ -228,7 +228,7 @@ bundle agent update_action
"${rudder_update_conf.policy_server_hash_file}"
create => "true",
edit_line => u_rudder_update_lines_present("&POLICY_SERVER_KEY&"),
edit_defaults => empty;
edit_defaults => u_rudder_empty;
&endif&

any::
Expand Down Expand Up @@ -458,3 +458,9 @@ bundle edit_line u_rudder_update_lines_present(lines)
insert_lines:
"${lines}";
}

body edit_defaults u_rudder_empty
{
empty_file_before_editing => "true";
edit_backup => "false";
}