diff options
author | Sascha Grunert <sgrunert@suse.com> | 2019-05-08 08:49:08 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2019-05-13 14:00:27 +0200 |
commit | d1fc3fc702cce6efca4a20f972ef1931c8392548 (patch) | |
tree | 3202ed2e2a36c622362d6585495c5c564c800962 /libpod/events/events_linux.go | |
parent | d2571c7fd49d22e822a6f3b3796488218c9f9e46 (diff) | |
download | podman-d1fc3fc702cce6efca4a20f972ef1931c8392548.tar.gz podman-d1fc3fc702cce6efca4a20f972ef1931c8392548.tar.bz2 podman-d1fc3fc702cce6efca4a20f972ef1931c8392548.zip |
Add `systemd` build tag
If the systemd development files are not present on the system which
builds podman, then `podman events` will error on runtime creation.
Beside this, a warning will be printed when compiling podman.
This commit mainly exists because projects which depend on libpod
would not need the podman event support and therefore do not need to
rely on the systemd headers.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'libpod/events/events_linux.go')
-rw-r--r-- | libpod/events/events_linux.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/events/events_linux.go b/libpod/events/events_linux.go index da5d7965e..11f309574 100644 --- a/libpod/events/events_linux.go +++ b/libpod/events/events_linux.go @@ -8,12 +8,14 @@ import ( ) // NewEventer creates an eventer based on the eventer type -func NewEventer(options EventerOptions) (Eventer, error) { - var eventer Eventer +func NewEventer(options EventerOptions) (eventer Eventer, err error) { logrus.Debugf("Initializing event backend %s", options.EventerType) switch strings.ToUpper(options.EventerType) { case strings.ToUpper(Journald.String()): - eventer = EventJournalD{options} + eventer, err = newEventJournalD(options) + if err != nil { + return nil, errors.Wrapf(err, "eventer creation") + } case strings.ToUpper(LogFile.String()): eventer = EventLogFile{options} default: |