# /etc/rc.d/this_one_runs_last



## Juha Nurmela (Feb 10, 2016)

Is there a nice way to make rc(8) service script to run *last* ? I had a look in rcorder(8) etc but did not see a proper bullet proof way.

This is just idle academic, not really important, if in real need one can always patch /etc/rc (and repatch after upgrades), no big deal.

Juha


----------



## aragats (Feb 10, 2016)

There was a discussion on this topic on the mailing list:
https://lists.freebsd.org/pipermail/freebsd-questions/2016-January/270267.html
(this thread has a continuation in next month).


----------



## Juha Nurmela (Feb 10, 2016)

Seems that rcorder(8) emits a warning but continues ok, if one uses nonexistent REQUIREs. Excellent. A new checkpoint could be created, if ever needed, that requires a selection of the usual suspects even if they are not all installed.

```
# PROVIDE: ALMOSTTHERE
# REQUIRE: LOGIN cron dbus natd sshd mail bluetooth xdm gdm kdm
```

Would be nice to have a _xdm?_ mechanism, but that's cosmetics.

Juha


----------



## SirDice (Feb 11, 2016)

Juha Nurmela said:


> if in real need one can always patch /etc/rc (and repatch after upgrades), no big deal.


/etc/rc.local is probably better suited for this. If I remember correctly it's run at the very last. And it won't be overwritten with an update.


----------



## Juha Nurmela (Feb 11, 2016)

It's not last, I was also surprised to notice that. I don't mean that it should be, or that there is any real value in being the very last. Just idle curiosity.

Juha


----------

