Skip to main content
added 81 characters in body
Source Link
goldilocks
  • 60.1k
  • 17
  • 115
  • 230

I believe there's a degree of indeterminacy with regard to execution order. If this isn't required by anything else, and isn't required to happen before anything else, then it won't be a priority.

What is the correct SystemD Requires= directive(s) for using GPIO pins?

The GPIO functionality is built into the kernel, so by the time init (systemd) runs there's not really anything required, although since you're using the root filesystem you probably do want local-fs.target (that could be only true if you need read-write access, I'm not sure -- the fact that it doesn't work without that implies you do need it).

You can't make something else depend upon this unless you modify it'sits service file, however, (a bad idea if that something else wasn't also added by you). However, you can use the Before= directive (see man systemd.unit). Since a lot of other things are dependent on the system logger, if you use:

Before=rsyslog.service

Then it should happen before many or most other things. Double check to make sure that's actually in use first (systemclt list-units | grep rsyslog), otherwise this won't make any difference.

what would be a good WantedBy= directive to allow an early start of the application?

That's irrelevant to execution order. It is used to determine in what context the service should be run at boot; basic.target probably covers any of them. I think default.target is more appropriate but that is just a casual opinion and in any case, again, this is about whether or not to run it, not when to run it.

I believe there's a degree of indeterminacy with regard to execution order. If this isn't required by anything else, and isn't required to happen before anything else, then it won't be a priority.

What is the correct SystemD Requires= directive(s) for using GPIO pins?

The GPIO functionality is built into the kernel, so by the time init (systemd) runs there's not really anything required, although since you're using the root filesystem you probably do want local-fs.target (that could be only true if you need read-write access, I'm not sure).

You can't make something else depend upon this unless you modify it's service file, however, you can use the Before= directive (see man systemd.unit). Since a lot of other things are dependent on the system logger, if you use:

Before=rsyslog.service

Then it should happen before many or most other things. Double check to make sure that's actually in use first (systemclt list-units | grep rsyslog), otherwise this won't make any difference.

what would be a good WantedBy= directive to allow an early start of the application?

That's irrelevant to execution order. It is used to determine in what context the service should be run at boot; basic.target probably covers any of them. I think default.target is more appropriate but that is just a casual opinion and in any case, again, this is about whether or not to run it, not when to run it.

I believe there's a degree of indeterminacy with regard to execution order. If this isn't required by anything else, and isn't required to happen before anything else, then it won't be a priority.

What is the correct SystemD Requires= directive(s) for using GPIO pins?

The GPIO functionality is built into the kernel, so by the time init (systemd) runs there's not really anything required, although since you're using the root filesystem you probably do want local-fs.target (that could be only true if you need read-write access, I'm not sure -- the fact that it doesn't work without that implies you do need it).

You can't make something else depend upon this unless you modify its service file (a bad idea if that something else wasn't also added by you). However, you can use the Before= directive (see man systemd.unit). Since a lot of other things are dependent on the system logger, if you use:

Before=rsyslog.service

Then it should happen before many or most other things. Double check to make sure that's actually in use first (systemclt list-units | grep rsyslog), otherwise this won't make any difference.

what would be a good WantedBy= directive to allow an early start of the application?

That's irrelevant to execution order. It is used to determine in what context the service should be run at boot; basic.target probably covers any of them. I think default.target is more appropriate but that is just a casual opinion and in any case, again, this is about whether or not to run it, not when to run it.

Source Link
goldilocks
  • 60.1k
  • 17
  • 115
  • 230

I believe there's a degree of indeterminacy with regard to execution order. If this isn't required by anything else, and isn't required to happen before anything else, then it won't be a priority.

What is the correct SystemD Requires= directive(s) for using GPIO pins?

The GPIO functionality is built into the kernel, so by the time init (systemd) runs there's not really anything required, although since you're using the root filesystem you probably do want local-fs.target (that could be only true if you need read-write access, I'm not sure).

You can't make something else depend upon this unless you modify it's service file, however, you can use the Before= directive (see man systemd.unit). Since a lot of other things are dependent on the system logger, if you use:

Before=rsyslog.service

Then it should happen before many or most other things. Double check to make sure that's actually in use first (systemclt list-units | grep rsyslog), otherwise this won't make any difference.

what would be a good WantedBy= directive to allow an early start of the application?

That's irrelevant to execution order. It is used to determine in what context the service should be run at boot; basic.target probably covers any of them. I think default.target is more appropriate but that is just a casual opinion and in any case, again, this is about whether or not to run it, not when to run it.