Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481080 - net-misc/netifrc should provide a stub /etc/conf.d/net file
Summary: net-misc/netifrc should provide a stub /etc/conf.d/net file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard: netifrc:DOC netifrc:EBUILD
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 18:49 UTC by Ian Stakenvicius (RETIRED)
Modified: 2016-11-27 22:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Stakenvicius (RETIRED) gentoo-dev 2013-08-14 18:49:11 UTC
The following used to be provided by openrc into /etc/conf.d/net:

# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).

..but since this has been dropped from openrc, netifrc should provide it instead.
An entry in ${filesdir} is simple enough to fix for netifrc-0.1 , but I don't know if this is something that should be included in the git repo directly for future versions?
Comment 1 William Hubbs gentoo-dev 2013-08-14 19:08:00 UTC
Not providing it in the /etc/conf.d/net location was a decision I made,
because it would trigger config_protect and there have been issues in
the past with users nuking their network config, similar to why we don't
trigger config_protect for files like /etc/fstab.

We could provide it again, but I am a bit cautious about triggering
config_protect on this file.

Thoughts?

William
Comment 2 William Hubbs gentoo-dev 2013-08-14 19:33:17 UTC
There is a README in the /usr/share/doc/netifrc* directory that tells
you how to set up your /etc/conf.d/net. Since that is in place, do you
still feel that we should provide the stub in /etc/conf.d/net?
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2013-08-14 20:06:25 UTC
Nope.  Rationale suffices.  A reminder of this in a one-time postinst() message would be good though.  For robbat2 - as discussed on #gentoo-dev:

--- netifrc-0.1.ebuild	14 Aug 2013 06:37:32 -0000	1.1
+++ netifrc-0.1.ebuild	14 Aug 2013 19:51:31 -0000
@@ -50,3 +50,12 @@
 src_install() {
 	emake ${MAKE_ARGS} DESTDIR="${D}" install
 }
+
+pkg_postinst() {
+	if [[ ! -e "${EROOT}"etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+		elog "The network configuration scripts will use dhcp by
+		elog "default to set up your interfaces."
+		elog "If you need to set up something more complete, see"
+		elog "${EROOT}usr/share/doc/${P}/README"
+	fi
+}


..plus I think the README should probably be made a bit more verbose:

This package provides a system of modules to manage and configure network
interfaces via individual per-interface scripts in /etc/init.d.  Provided
is the parent script "/etc/init.d/net.lo", which should be symlinked to
create additional scripts for each interface to be configured:

	ln -s /etc/init.d/net.{lo,eth0}

Configuration is handled in "/etc/conf.d/net".  A default (empty or missing)
/etc/conf.d/net automatically uses DHCP to configure any network interfaces 
started by these scripts.  To create a more complete configuration, please 
review net.example* in this directory and save your configuration 
in /etc/conf.d/net.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-24 01:21:42 UTC
The git portion is in, but we need to keep this open for when we bump the ebuild still.

axs: Can you please put it in the 9999 version of the ebuild (if it doesn't exist, please create).
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-11-27 22:59:51 UTC
This has been present for years.