Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2086

bundle agent standard_services chokes on systemctl output

    XMLWordPrintable

    Details

      Description

      systemd_service_info doesn't get populated.

      This is the systemctl output that causes the problem:
      ExecStart={ path=/usr/sbin/automount ; argv[]=/usr/sbin/automount ${AUTOFS_OPTIONS} -p /var/run/automount.pid ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }

      Original line in bundle
      "systemd_service_info" slist => string_split(execresult("$(call_systemctl) show $(service)", "noshell"), "\n", "150");

      If I change it to this, it works:
      "systemd_service_info" slist => string_split(execresult("$(call_systemctl) show $(service) | /usr/bin/sed 's/[\{\}]//g' ", "useshell"), "\n", "150");

      Looks like it is choking on the

      { or }

      character.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              toltec_cfe Bill Weidman
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: