[arch-general] Sourcing /etc/rc.conf in configs and .install scripts
Leonid Isaev
lisaev at umail.iu.edu
Tue Nov 12 17:01:30 EST 2013
On Tue, 12 Nov 2013 22:41:19 +0100
Karol Blazewicz <karol.blazewicz at gmail.com> wrote:
> On Tue, Nov 12, 2013 at 10:25 PM, Leonid Isaev <lisaev at umail.iu.edu> wrote:
> > On Tue, 12 Nov 2013 22:05:12 +0100
> > Karol Blazewicz <karol.blazewicz at gmail.com> wrote:
> >
> >> I noticed a few configs and .install scripts mention /etc/rc.conf
> >> (mostly it's just '. /etc/rc.conf'), even though initscripts are not
> >> supported anymore.
> >>
> >> For example locale.sh from filesystem package has
> >>
> >> elif [ -r /etc/rc.conf ]; then
> >> LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE")
> >> fi
> >>
> >>
> >> Should I open a bug report for this?
> >
> > What are the other packages?
> >
> > In the particular case of the filesystem package, I think the above
> > conditional is actually useful. It is never triggered on an
> > initscripts-less installation, yet it makes the filesystem package
> > workable for people who prefer legacy initscripts.
> >
> > Cheers,
> > --
> > Leonid Isaev
> > GnuPG key: 0x164B5A6D
> > Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
>
>
> I just searched /var/abs. Below I posted the files that mention
> /etc/rc.conf and the relevant part of the file in question. Maybe we
> can remove /etc/rc.d/functions too?
Some observations:
* kexec-tools, xinetd, rp-pppoe, hylafax
Those are legacy initscripts which are still tracked by SVN but not
installed in PKGBUILD (and not present in packages).
* pound/pound.runit
Runit is an alternative init system... I'm not sure how it intergrates with
Arch and whether the corresponding startup script actually needs rc.conf.
>
> * core/xinetd/xinetd:
> * core/rp-pppoe/adsl:
> * extra/hylafax/hylafax:
> * community/motion/rc.motion:
> * community/jmc/jmc.rc:
>
> #!/bin/bash
>
> . /etc/rc.conf
> . /etc/rc.d/functions
>
>
> * extra/kexec-tools/kexec:
>
> #!/bin/bash
>
> [ -f /etc/conf.d/kexec ] && . /etc/conf.d/kexec
>
> . /etc/rc.conf
> . /etc/rc.d/functions
>
>
> * community/pound/pound.runit:
>
> #!/bin/sh
> exec 2>&1
> # general config
> . /etc/rc.conf
> . /etc/rc.d/functions
>
>
> * core/nfs-utils/nfs-utils.install:
>
> post_upgrade() {
> if [ "$(vercmp $2 1.2.0-2)" -lt 0 ]; then
> cat << 'EOM'
> ==> IMPORTANT NFS UTILS CHANGES:
> ==> This is a rather important upgrade, you are going to have to
> change config files.
> ==> /etc/rc.conf daemons changes:
> ==> Change portmap to rpcbind
> ==> Change nfslock to nfs-common
> ==> Change nfsd to nfs-server
> ==>
> ==> Extended configuration options for NFS (clients & server) are
> available in:
> ==> /etc/conf.d/nfs-common
> ==> /etc/conf.d/nfs-server
> ==> Please change them to your needs.
> EOM
> fi
> }
>
>
> * community/gnump3d/gnump3d.install:
>
> # arg 1: the new package version
> post_install() {
> chown nobody:root /var/cache/gnump3d /var/cache/gnump3d/serving
>
> echo
> echo "----[ NOTE
> ]----------------------------------------------------------"
> echo "| Before starting the server, edit /etc/gnump3d/gnump3d.conf
> to your |"
> echo "| liking. For instance, you will probably want to change the
> \"root\" |"
> echo "| variable so that it points to your music collection.
> |"
> echo "|
> |"
> echo "| When the \"root\" variable is properly set, run
> |"
> echo "| /usr/bin/gnump3d-index
> |"
> echo "| This will create a database in /var/cache/gnump3d/ for
> gnump3d. |"
> echo "|
> |"
> echo "| Per default, the server runs as \"nobody\", which is a
> Good Thing. |"
> echo "|
> |"
> echo "| To make the server start on boot, add \"gnump3d\" to the
> DAEMONS |"
> echo "| array in /etc/rc.conf.
> |"
> echo
> "----------------------------------------------------------------------" echo
> }
--
Leonid Isaev
GnuPG key: 0x164B5A6D
Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20131112/c2f620c5/attachment.asc>
More information about the arch-general
mailing list