# [rcorder] REQUIRE not being followed/used



## mix_room (Mar 25, 2013)

I am not getting the REQUIRE and PROVIDE code words in the rc-framework to work properly. 

What I have is two scripts, tellstickController and telldusd, where the first depends on the second. As I understood it, it should be sufficient to include the 'PROVIDE: service' in the dependency, and 'REQUIRE: service' in the dependant. 


```
[file]/usr/local/etc/rc.d/tellstickController[/file]
#!/bin/sh

# PROVIDE: tellstickController
# REQUIRE: LOGIN DAEMON telldusd
#
...
```

and 


```
[file]/usr/local/etc/rc.d/telldusd[/file]
#!/bin/sh

#PROVIDE: telldusd
#REQUIRE: LOGIN DAEMON devd
#
...
```

The are both in my /usr/local/etc/rc.d folder, but I get the wrong ordering: 

```
[cmd="#"]rcorder /etc/rc.d/* /usr/local/etc/rc.d/tell* | grep tell[/cmd]
rcorder: requirement `telldusd' in file `/usr/local/etc/rc.d/tellstickController' has no providers.
/usr/local/etc/rc.d/tellstickController
/usr/local/etc/rc.d/telldusd
```

Is there anything that I have missed, something that is hiding in plain sight? 

What do I need to change to solve this problem?

EDIT: it seems that the other providers are not being filled properly either, I added 'lighttpd' as a requirement, but that isn't found either.

EDIT2: I worked around it by checking if the provider is running, and force-starting it if not, but I am not happy with this solution. My question still stands.


----------



## wblock@ (Mar 25, 2013)

Ah... from rcorder(8):

```
The format of the lines is rigid.  Each line must begin with a single `#', followed by
a single space, followed by ``PROVIDE:'', ``REQUIRE:'', ``BEFORE:'', or ``KEYWORD:''.
No deviation is permitted.
```


----------



## mix_room (Mar 25, 2013)

wblock@ said:
			
		

> Ah... from rcorder(8):



Excellent! Thanks. That worked.


----------

