Skip to content

Commit

Permalink
Adjusted peer related examples in regards to hostname -f versus sys.f…
Browse files Browse the repository at this point in the history
…qhost

This was breaking on some systems in a way that doesn't benefit the test.

Instead of assuming that `hostname -f` is equal to `sys.fqhost` just use `sys.fqhost` in the first place.

Ticket: ENT-12437
Changelog: none
  • Loading branch information
craigcomstock committed Nov 14, 2024
1 parent e5fa238 commit 9c05580
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/peerleader.cf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#@ echo beta >> /tmp/cfe_hostlist
#@ echo gamma >> /tmp/cfe_hostlist
#@ echo "Set HOSTNAME appropriately beforehand"
#@ echo "$(hostname -f)" | tr 'A-Z' 'a-z' >> /tmp/cfe_hostlist
#@ touch $CFENGINE_TEST_OVERRIDE_WORKDIR/inputs/promises.cf # to enable cf-promises to run
#@ bash -c "${CF_PROMISES} --show-vars=sys.fqhost | grep fqhost | awk '{print \$2}' | tr 'A-Z' 'a-z' 2>&1 >> /tmp/cfe_hostlist"
#@ echo "Delta Delta Delta may I help ya help ya help ya"
#@ echo delta1 >> /tmp/cfe_hostlist
#@ echo delta2 >> /tmp/cfe_hostlist
Expand Down
3 changes: 2 additions & 1 deletion examples/peerleaders.cf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#@ echo beta >> /tmp/cfe_hostlist
#@ echo gamma >> /tmp/cfe_hostlist
#@ echo "Set HOSTNAME appropriately beforehand"
#@ echo "$(hostname -f)" | tr 'A-Z' 'a-z' >> /tmp/cfe_hostlist
#@ touch $CFENGINE_TEST_OVERRIDE_WORKDIR/inputs/promises.cf # to enable cf-promises to run
#@ bash -c "${CF_PROMISES} --show-vars=sys.fqhost | grep fqhost | awk '{print \$2}' | tr 'A-Z' 'a-z' 2>&1 >> /tmp/cfe_hostlist"
#@ echo "Delta Delta Delta may I help ya help ya help ya"
#@ echo delta1 >> /tmp/cfe_hostlist
#@ echo delta2 >> /tmp/cfe_hostlist
Expand Down
3 changes: 2 additions & 1 deletion examples/peers.cf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#@ echo beta >> /tmp/cfe_hostlist
#@ echo gamma >> /tmp/cfe_hostlist
#@ echo "Set HOSTNAME appropriately beforehand"
#@ echo "$(hostname -f)" | tr 'A-Z' 'a-z' >> /tmp/cfe_hostlist
#@ touch $CFENGINE_TEST_OVERRIDE_WORKDIR/inputs/promises.cf # to enable cf-promises to run
#@ bash -c "${CF_PROMISES} --show-vars=sys.fqhost | grep fqhost | awk '{print \$2}' | tr 'A-Z' 'a-z' 2>&1 >> /tmp/cfe_hostlist"
#@ echo "Delta Delta Delta may I help ya help ya help ya"
#@ echo delta1 >> /tmp/cfe_hostlist
#@ echo delta2 >> /tmp/cfe_hostlist
Expand Down

0 comments on commit 9c05580

Please sign in to comment.