Skip to content

Conversation

@AndersonTorres
Copy link
Contributor

@AndersonTorres
Copy link
Contributor Author

@cyrillkuettel can you test this?

Makefile Outdated
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man
MAN1DIR ?= $(MANDIR)/man1
SYSCONFDIR ?= $(PREFIX)/etc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also change this back to just "/etc" ? It's a little confusing if the config file earlyoom.default is not stored in /etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If earlyoom.default is meant to be read by earlyoom main program, then this file and the main program should point to the same PREFIX, e.g. /usr/local.

The systemd service is meant to be read by the external systemd, therefore it will be put in another location not necessarily equal to the PREFIX of earlyoom - usually /etc/systemd/system/.

Is there anything wrong with the above?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, earlyoom.default is read by systemd, here: https://github.com/rfjakob/earlyoom/blob/master/earlyoom.service.in#L6

Copy link
Contributor Author

@AndersonTorres AndersonTorres Nov 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the Makefile deals with SYSCONFIDIR in other places:

sed "s|:TARGET:|$(BINDIR)|g;s|:SYSCONFDIR:|$(SYSCONFDIR)|g" $< > $@

But let's do as you suggested.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it will work, but I find it confusing to have the config file for /etc/systemd/system/earlyoom.service in /usr/local . Thanks!

@rfjakob rfjakob merged commit d38e29b into rfjakob:master Nov 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation fails due to systemd unit file not being copied to correct location

2 participants