# Unresolved dependencies in rcorder



## jordanch (Aug 29, 2019)

I seem to have some odd problem with my rcorder. As an example, I consider here /usr/local/etc/rc.d/ezjail.
When I run `rcorder /usr/local/etc/rc.d/ezjail` I get a bunch of errors like


```
rcorder: file `/usr/local/etc/rc.d/ezjail' is before unknown provision `securelevel'
rcorder: requirement `sshd' in file `/usr/local/etc/rc.d/ezjail' has no providers.
rcorder: requirement `cleanvar' in file `/usr/local/etc/rc.d/ezjail' has no providers.
rcorder: requirement `LOGIN' in file `/usr/local/etc/rc.d/ezjail' has no providers.
```

The /usr/local/etc/rc.d/ezjail has the lines - 


```
# PROVIDE: ezjail
# REQUIRE: LOGIN cleanvar sshd
# BEFORE: securelevel
# KEYWORD: nojail shutdown
```


As one of the errors mentioned `sshd`, I check the /etc/rc.d/sshd. That has a line 


```
# PROVIDE: sshd
```

So, ezjail requires sshd, and it is provided. Why does it still complain? And how can I fix it?


----------



## yuripv (Aug 29, 2019)

You need to actually pass *all* required files to rcorder for it to list dependency ordering, so:

```
rcorder /usr/local/etc/rc.d/ezjail /etc/rc.d/*
```
...would show when ezjail is run among the base scripts.


----------



## jordanch (Aug 29, 2019)

yuripv said:


> You need to actually pass *all* required files to rcorder for it to list dependency ordering, so:
> 
> ```
> rcorder /usr/local/etc/rc.d/ezjail /etc/rc.d/*
> ...



Thanks, so I had a look, and the "required" scripts `LOGIN`, `cleanvar`, `sshd` are all before `ezjail`.. so I'm still lost..


----------



## jordanch (Aug 29, 2019)

Perhaps the trouble lies with another of these scripts. Doing `rcorder /usr/local/etc/rc.d/*` throws a bunch of errors. But recursively digging through that list seems too tedious. 
So for the moment, I'll just cheat and manuall start ezjail with a cronjob with `sleep` prefixed at the beginning.


----------



## yuripv (Aug 29, 2019)

So what is the exact problem you are trying to solve?


----------



## jordanch (Aug 29, 2019)

yuripv said:


> So what is the exact problem you are trying to solve?



I just want ezjail to start automatically at reboot... 
It wasn't so I investigated and found a bunch of problems at rcorder, which ideally I also want to go away..


----------



## yuripv (Aug 29, 2019)

OK, so if you specify `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*`, does *that* show any issues? It's how it works anyway, processing *all* of the scripts to find dependencies.

Now about your problem with ezjail startup, check the rc_debug variable in rc.conf(5).


----------



## jordanch (Aug 29, 2019)

yuripv said:


> OK, so if you specify `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*`, does *that* show any issues? It's how it works anyway, processing *all* of the scripts to find dependencies.



Yes, indeed! Doing that shows a couple of errors with kerberos and named... 


```
rcorder: file `/usr/local/etc/rc.d/tcsd' is before unknown provision `kerberos'
rcorder: file `/usr/local/etc/rc.d/tcsd' is before unknown provision `named'
```


----------

