Bug #19584

Some shells complain about heredoc ended by EOF

Added by Adam Ruzicka 3 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Adam Ruzicka
Category:Smart Proxy - SSH
Target version:Foreman - Team Ivan Iteration 15
Difficulty:trivial Pull request:https://github.com/theforeman/foreman_remote_execution/pull/248
Bugzilla link:
Story points-
Velocity based estimate-
Releaseforeman_remote_execution_core 1.0.4Release relationshipAuto

Description

It works because the last command before the end of the heredoc is an exit command. We need to strip the leading whitespace from the control script

After running ls:


1: bash: line 3: warning: here-document at line 0 delimited by end-of-file (wanted `WRAPPER')
2: borg
3: foreman-ssh-cmd-c9c6a6cd-7ca4-470a-85fb-4f8fa8b4eba5
4: Exit status: 0


Related issues

Related to Foreman Remote Execution - Feature #19401: Allow choice of target shell in Remote Execution Closed 04/27/2017

Associated revisions

Revision eb954243
Added by Adam Ruzicka 3 months ago

Fixes #19584 - Trim leading whitespace from control script

History

#1 Updated by Adam Ruzicka 3 months ago

This happens when sh is symlink to bash on the target machine

#2 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/248 added

#3 Updated by Ivan Necas 3 months ago

  • Related to Feature #19401: Allow choice of target shell in Remote Execution added

#4 Updated by Adam Ruzicka 3 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Ivan Necas 3 months ago

  • Release set to foreman_remote_execution_core 1.0.4

Also available in: Atom PDF