[arch-general] Sourcing /etc/rc.conf in configs and .install scripts

Karol Blazewicz karol.blazewicz at gmail.com
Tue Nov 12 16:41:19 EST 2013


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?

* 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
}


More information about the arch-general mailing list