View previous topic :: View next topic |
Author |
Message |
haven Tux's lil' helper
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Thu Jan 26, 2012 8:59 am Post subject: [Solved] Preventing openrc "fixing" /etc/init.d/ne |
|
|
Hi All,
I've taken a look and cant' find this covered anywhere so apologies if it already has been.
Whenever the openrc package is updated it replaces any custom /etc/init.d/net.* files with symlinks to net.lo.
Given I have some net devices that I do not want to provide net as a service I keep having to remove these symlinks and copy net.lo back in place and repeat my edits.
What is the best way to prevent openrc from replacing these files automatically ? (I've tried CONFIG_PROTECT in /etc/make.conf and that has not helped unfortunately)
Thanks.
Last edited by haven on Wed Feb 01, 2012 1:36 pm; edited 1 time in total |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9527 Location: beyond the rim
|
Posted: Thu Jan 26, 2012 11:38 am Post subject: |
|
|
Two possible workarounds:
- if /etc is on a ext[234] filesystem use chattr +i to make the files immutable so no process can modify/delete them anymore, including root, without explicitly resetting the flag first. At the moment the openrc ebuild ignores errors when trying to replace the files, so this should work, but in the future the ebuild might check for errors and abort the merge process.
- when the openrc ebuild replaces the files with links it creates a backup first (see elog messages), so a simple post_pkg_preinst hook in /etc/portage/bashrc could restore them |
|
Back to top |
|
|
Christian99 Veteran
Joined: 28 May 2009 Posts: 1668
|
Posted: Thu Jan 26, 2012 12:07 pm Post subject: |
|
|
what about "/etc/rc.conf"? Something like Code: | rc_net_eth0_provide="!net" | could do the trick |
|
Back to top |
|
|
haven Tux's lil' helper
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Thu Jan 26, 2012 2:10 pm Post subject: |
|
|
Thanks Guys,
I'll give Christian99's option a go and see how well that works on a reboot.
Regards |
|
Back to top |
|
|
haven Tux's lil' helper
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Wed Feb 01, 2012 1:36 pm Post subject: |
|
|
That worked a treat thanks. I'll update this to solved. |
|
Back to top |
|
|
|