[arch-general] Sourcing /etc/rc.conf in configs and .install scripts
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?
[2013-11-12 22:05:12 +0100] Karol Blazewicz:
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?
Yes. Opening bug reports never hurts. One per package, please. -- Gaetan
On Tue, 12 Nov 2013 22:05:12 +0100 Karol Blazewicz <karol.blazewicz@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
On Tue, Nov 12, 2013 at 10:25 PM, Leonid Isaev <lisaev@umail.iu.edu> wrote:
On Tue, 12 Nov 2013 22:05:12 +0100 Karol Blazewicz <karol.blazewicz@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 }
On Tue, 12 Nov 2013 22:41:19 +0100 Karol Blazewicz <karol.blazewicz@gmail.com> wrote:
On Tue, Nov 12, 2013 at 10:25 PM, Leonid Isaev <lisaev@umail.iu.edu> wrote:
On Tue, 12 Nov 2013 22:05:12 +0100 Karol Blazewicz <karol.blazewicz@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
On 13/11/13 07:41, Karol Blazewicz wrote:
* 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 }
I'd say any package with a multiline output should have a bug filed to remove it. A
[2013-11-12 15:25:09 -0600] Leonid Isaev:
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.
The choice is between supporting an init system which we decided not to support anymore, and making the scripts from the filesystem package cleaner and easier to maintain. Easy choice for me... -- Gaetan
participants (4)
-
Allan McRae
-
Gaetan Bisson
-
Karol Blazewicz
-
Leonid Isaev