Gentoo Archives: gentoo-dev

From: Martin Schlemmer <azarah@g.o>
To: Gentoo-Dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] /etc/init.d
Date: Mon, 11 Mar 2002 13:49:05
Message-Id: 1015875830.7116.14.camel@nosferatu.lan
In Reply to: Re: [gentoo-dev] /etc/init.d by Matt Beland
1 On Mon, 2002-03-11 at 20:54, Matt Beland wrote:
2 > On Mon, Mar 11, 2002 at 01:16:45PM -0500, Yannick Koehler wrote:
3 > > Craig M. Reece wrote:
4 > > >On Mon, Mar 11, 2002 at 12:48:08PM -0500, Yannick Koehler spoke thusly:
5 > > >
6 > > >>Guys,
7 > > >>
8 > > >> not sure for anyone else but is init.d really need to be protected?
9 > > >> I mean does someone really change files in that directory (other
10 > > >> than adding or removing)?
11 > > >>
12 > > >> That dir should always get merged. It would also get really nice of
13 > > >> the portage could detect that no changes has been made to the file
14 > > >> since its installation and therefore merge it without any issues.
15 > > >>
16 > > >> Like if the protected config file's time were saved in a temp files
17 > > >> that portage would look into before merging to see if the date has
18 > > >> or not change since the last install.
19 > > >>
20 > > >>
21 > > >
22 > > >Yes it needs to be protected. I, for instance, have my own version of
23 > > >pcmcia in there that I don't want stepped on. Also, I have a couple of
24 > > >other custom scripts for things not in portage yet; and when they are in
25 > > >portage, I want to be able to compare the differences before using one
26 > > >or the other.
27 > >
28 > > The reasoning I have is that those are scripts, and not config files.
29 > > If ... instead of modifying pcmcia script for example like you
30 > > mentionned you were to cp pcmcia pcmcia.modif and rc-update add
31 > > pcmcia.modif default / rc-update del pcmcia default the system would
32 > > work and you'll never get concerned about the new pcmcia scripts.
33 >
34 > They are sometimes both scripts and config files. Personally, I like the
35
36 Just note that as of baselayout-1.7.3 i think, no more rc-scripts have
37 variables that you set inside the script itself ... they all are in
38 /etc/conf.d/ .
39
40 > layout of the Gentoo initscripts, particularly with regard to the "local"
41 > script and the ability to start "simple" daemons and scripts with a config
42 > file. However, many of the scripts we add to the init.d directory are not
43 > custom-written for Gentoo, they're written for Linux in general. They
44 > include the necessary config settings in the init file itself. And those
45 > should not be clobbered.
46 >
47 > > If you changes those scripts maybe it's even better to tell people about
48 > > your changes as they may get implemented such that the script itself
49 > > read a config files (like net.eth0) so that other people can re-use your
50 > > modifications.
51 >
52 > That's fine for things like the tweaked pcmcia script - but what if the
53 > tweaks are in order to permit a specific driver to work properly? Those
54 > changes should not be in the default initscript, they should at most be
55 > provided as a commented-out section - which, again, would require user
56 > intervention to create the required "tweaked" script.
57 >
58 > It wouldn't solve the problem for custom scripts. Suppose (as an example)
59 > that I have installed OpenSSH by compiling it from source, then later
60 > I emerge the ssh ebuild. I would have installed an initscript already,
61 > I would call it 'sshd' by default. Before I blindly replace it with the
62 > Gentoo initscript, I would want to examine it and see how it did things.
63 >
64 > > And maybe a user's scripts directory should exists, something like
65 > > /etc/user.d where people can move their custom scripts and the stuff
66 > > behind rc-update would got here first and if it doesn't found the script
67 > > then to /etc/init.d.
68 >
69 > While I don't agree with everything that "the standard linux" build does,
70 > particularly as defined in the LSB project, I don't think we should be
71 > creating new directories within /etc/ just to make things a little more
72 > convenient. Especiually when that convenience comes with a price in the
73 > form of an increased risk of system breakage.
74 >
75 > --
76 > Matt Beland
77 > matt@××××××××××××××.org
78 > http://www.rearviewmirror.org
79 --
80
81 Martin Schlemmer
82 Gentoo Linux Developer, Desktop Team Developer
83 Cape Town, South Africa