On Mon, Mar 11, 2002 at 01:16:45PM -0500, Yannick Koehler wrote: > Craig M. Reece wrote: > >On Mon, Mar 11, 2002 at 12:48:08PM -0500, Yannick Koehler spoke thusly: > > > >>Guys, > >> > >> not sure for anyone else but is init.d really need to be protected? > >> I mean does someone really change files in that directory (other > >> than adding or removing)? > >> > >> That dir should always get merged. It would also get really nice of > >> the portage could detect that no changes has been made to the file > >> since its installation and therefore merge it without any issues. > >> > >> Like if the protected config file's time were saved in a temp files > >> that portage would look into before merging to see if the date has > >> or not change since the last install. > >> > >> > > > >Yes it needs to be protected. I, for instance, have my own version of > >pcmcia in there that I don't want stepped on. Also, I have a couple of > >other custom scripts for things not in portage yet; and when they are in > >portage, I want to be able to compare the differences before using one > >or the other. > > The reasoning I have is that those are scripts, and not config files. > If ... instead of modifying pcmcia script for example like you > mentionned you were to cp pcmcia pcmcia.modif and rc-update add > pcmcia.modif default / rc-update del pcmcia default the system would > work and you'll never get concerned about the new pcmcia scripts. They are sometimes both scripts and config files. Personally, I like the layout of the Gentoo initscripts, particularly with regard to the "local" script and the ability to start "simple" daemons and scripts with a config file. However, many of the scripts we add to the init.d directory are not custom-written for Gentoo, they're written for Linux in general. They include the necessary config settings in the init file itself. And those should not be clobbered. > If you changes those scripts maybe it's even better to tell people about > your changes as they may get implemented such that the script itself > read a config files (like net.eth0) so that other people can re-use your > modifications. That's fine for things like the tweaked pcmcia script - but what if the tweaks are in order to permit a specific driver to work properly? Those changes should not be in the default initscript, they should at most be provided as a commented-out section - which, again, would require user intervention to create the required "tweaked" script. It wouldn't solve the problem for custom scripts. Suppose (as an example) that I have installed OpenSSH by compiling it from source, then later I emerge the ssh ebuild. I would have installed an initscript already, I would call it 'sshd' by default. Before I blindly replace it with the Gentoo initscript, I would want to examine it and see how it did things. > And maybe a user's scripts directory should exists, something like > /etc/user.d where people can move their custom scripts and the stuff > behind rc-update would got here first and if it doesn't found the script > then to /etc/init.d. While I don't agree with everything that "the standard linux" build does, particularly as defined in the LSB project, I don't think we should be creating new directories within /etc/ just to make things a little more convenient. Especiually when that convenience comes with a price in the form of an increased risk of system breakage. -- Matt Beland matt@rearviewmirror.org http://www.rearviewmirror.org