Re: Own boot scripts
On Mon, 11 Sep 2000, Julio Merino wrote:
> I would like to know where should I put my own boot up scripts. For
> example, I write one to restore my mixer setup on boot up and save it
> in shutdown. I saved it in /etc/init.d and then I made the appropiate
> links.
>
> I think that /etc/init.d is not the proper place because it could
> interfer with deb packages. So, where should be the proper place?
> Maybe a /usr/local/etc/init.d and /usr/local/etc/rc?.d directories?
I don't think Debian supports "local" init scripts.
The only interference with existing or future packages you could have
(aside from programming booboo's) is namespace conflicts.. a judicious
choice when naming your script will go a long way. An alternative
is to make a package containing your custom script(s) as "conffiles",
then dpkg will at least tell you when it wants to overwrite them.
There are a few options when it comes to packaging the scripts:
- doing it the proper way (a bit of a PITA for something so small, but
very educational, check the docs section of the archive for more info)
- using something like the "equivs" package (check the admin, misc and
utils sections of the archive)
- doing it manually:
- edit /var/lib/dpkg/status (and perhaps .../available)
so it contains an entry for your package, use existing entries
as a template and make sure to add the conffiles section with
md5sums.
- create /var/lib/dpkg/info/<packagename>.list containing all
the paths present in your package.
- create /var/lib/dpkg/info/<packagename>.conffiles containing
the absolute paths to all the stuff you want dpkg to check
with you about before upgrading.
IIRC, you may also want to make entries in status-old and available-old
so that dselect doesn't flag your package as "obsolete/local", but that
is purely cosmetic.
> Thanks.
Hope that helps
later,
Bruce
Reply to: