# net depdendencies

## zebbedi

Can anyone please tell me how I stop a particular service from being stopped by NetworkManager? I'm trying to exclude samba as it contains cached login credentials from being stopped when my wireless connection drops.

----------

## khayyam

 *zebbedi wrote:*   

> Can anyone please tell me how I stop a particular service from being stopped by NetworkManager? I'm trying to exclude samba as it contains cached login credentials from being stopped when my wireless connection drops.

 

zebbedi ... that's one of the shortcomings of using NetworkManager, once started by init.d it exists above and beyond it. So, there is nothing openrc can do about the services that 'rc_need=net' as NetworkManager is 'rc_provide=net'. You may be able to add 'rc_samba_need="!net" but it may not work (as samba will probably need net available to setup its shares). That said, I'm not at all familiar with NetworkManager, so perhaps it offers some built-in method of blacklisting services it stops/starts ... so, take the above with a pinch of salt.

Time for bed? ... best ... khay

----------

## zebbedi

Thanks,

I literally just found a page on rc_need. Slightly different to what you said but along the same lines, I've added rc_need="!net" to /etc/conf.d/samba.conf and it seems to work. It works in the sense that I can now at least login, but will have to test it when i get back to work to ensure it works correctly to put me back on to the network. 

Many thanks for your help.

----------

## khayyam

 *zebbedi wrote:*   

> I literally just found a page on rc_need. Slightly different to what you said but along the same lines, I've added rc_need="!net" to /etc/conf.d/samba.conf and it seems to work. It works in the sense that I can now at least login, but will have to test it when i get back to work to ensure it works correctly to put me back on to the network.

 

zebbedi, yes, though rc_samba_need="!net" was targeting /etc/rc.conf ... same difference.

 *zebbedi wrote:*   

> Many thanks for your help.

 

You're welcome & best ... khay

----------

