From 93cf64a6afabb803e290eb65e248a9ceac2308c6 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 23 Mar 2021 12:11:12 -0700 Subject: Switch to HEREDOC Signed-off-by: Tim Smith --- omnibus/package-scripts/chef/postinst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/omnibus/package-scripts/chef/postinst b/omnibus/package-scripts/chef/postinst index ed6689e246..61d1d0abe1 100755 --- a/omnibus/package-scripts/chef/postinst +++ b/omnibus/package-scripts/chef/postinst @@ -97,13 +97,15 @@ ln -sf $INSTALLER_DIR/bin/chef-client $PREFIX/bin || error_exit "Cannot link che # the sample client.rb is only written out of no chef config dir exists yet if ! [ -d $CONFIG_DIR ]; then mkdir -p $CONFIG_DIR - echo -e "# The client.rb file specifies how Chef Infra Client is configured on a node" > "$CONFIG_DIR/client.rb" - echo -e "# See https://docs.chef.io/config_rb_client/ for detailed configuration options" >> "$CONFIG_DIR/client.rb" - echo -e "#" >> "$CONFIG_DIR/client.rb" - echo -e "# Minimal example configuration:" >> "$CONFIG_DIR/client.rb" - echo -e "# node_name \"THIS_NODE_NAME\"" >> "$CONFIG_DIR/client.rb" - echo -e "# chef_server_url \"https://CHEF.MYCOMPANY.COM/organizations/MY_CHEF_ORG\"" >> "$CONFIG_DIR/client.rb" - echo -e "# chef_license \"accept\"" >> "$CONFIG_DIR/client.rb" + cat >"$CONFIG_DIR/client.rb" <