Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536432 - missing \ in net-setup script, creates invalid /etc/conf.d/net
Summary: missing \ in net-setup script, creates invalid /etc/conf.d/net
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: InstallCD (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-01-12 23:52 UTC by abandoned account
Modified: 2016-11-12 18:36 UTC (History)
4 users (show)

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


Attachments
fix missing \ (le.patch,515 bytes, patch)
2015-01-13 12:43 UTC, abandoned account
Details | Diff
Drop bash arrays and allow using ifconfig or iproute2 syntax (net-setup.patch,4.23 KB, patch)
2015-01-14 09:54 UTC, Jorge Manuel B. S. Vicetto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description abandoned account 2015-01-12 23:52:27 UTC
line 119 in `which net-setup` contains a line which is missing the \ at the end, therefore the output error from the next line gets into /etc/conf.d/net file

tested with what seems to be the latest livecd iso at this time: install-amd64-minimal-20141204.iso



Reproducible: Always

Steps to Reproduce:
1. execute net-setup enp0s3  (if inside virtualbox)
2. fill in all the required info (2,2 manual ip, wired network, no dhcp)
3. look inside /etc/conf.d/net
Actual Results:  
cat /etc/conf.d/net
# This network configuration was written by net-setup
config_enp0s3=( "192.168.169.200 broadcast 192.168.169.255 netmask /usr/sbin/net-setup: line 120: --inputbox: command not found" )
routes_enp0s3=( "default via 192.168.169.193" )


Expected Results:  
cat /etc/conf.d/net
# This network configuration was written by net-setup
config_enp0s3=( "192.168.169.200 broadcast 192.168.169.255 netmask 255.255.255.0 ")
routes_enp0s3=( "default via 192.168.169.193" )


Could someone tell me where can I find net-setup ? using portage(something like equery b net-setup ; but this won't work) or the link to this file online? Thanks.
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2015-01-13 12:30:09 UTC
I see net-setup is still producing old bash arrays config files - that means we need to fix it.
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2015-01-13 12:35:41 UTC
net-setup is part of livecd-tools[1].

 [1] - git://git.overlays.gentoo.org/proj/livecd-tools.git
Comment 3 abandoned account 2015-01-13 12:43:44 UTC
Created attachment 393846 [details, diff]
fix missing \
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2015-01-14 09:21:33 UTC
(In reply to EmanueL Czirai from comment #3)
> Created attachment 393846 [details, diff] [details, diff]
> fix missing \

I've applied your patch to the livecd-tools repo.
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2015-01-14 09:54:53 UTC
Created attachment 393946 [details, diff]
Drop bash arrays and allow using ifconfig or iproute2 syntax

This patch stops using bash arrays for the network configuration, which have been obsolete for a few years now, and allows using ifconfig or iproute2 syntax and commands to configure the network.
Comment 6 William Hubbs gentoo-dev 2015-01-14 15:36:22 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #5)
> Created attachment 393946 [details, diff] [details, diff]
> Drop bash arrays and allow using ifconfig or iproute2 syntax
> 
> This patch stops using bash arrays for the network configuration, which have
> been obsolete for a few years now, and allows using ifconfig or iproute2
> syntax and commands to configure the network.

My thought is that we can go more simple. Since iproute2 is now in @system, I would rather just use it. I don't know of a reason that a user would want to request to use ifconfig. If there is one, let me know.
Comment 7 William Hubbs gentoo-dev 2015-01-14 16:56:42 UTC
(In reply to William Hubbs from comment #6)
> (In reply to Jorge Manuel B. S. Vicetto from comment #5)
> > Created attachment 393946 [details, diff] [details, diff] [details, diff]
> > Drop bash arrays and allow using ifconfig or iproute2 syntax
> > 
> > This patch stops using bash arrays for the network configuration, which have
> > been obsolete for a few years now, and allows using ifconfig or iproute2
> > syntax and commands to configure the network.
> 
> My thought is that we can go more simple. Since iproute2 is now in @system,
> I would rather just use it. I don't know of a reason that a user would want
> to request to use ifconfig. If there is one, let me know.

One more thing I would add is that this patch consists of two logical changes, so we should commit it as two commits. Dropping the bash arrays is a separate issue, which I can apply first.
Comment 8 kristof.sno 2015-10-14 05:03:34 UTC
Latest amd64 minimal installation CD dated on 2015-09-24 still come with broken net-setup.
Isn't there any way to fix the problem?
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2016-11-12 18:36:48 UTC
My patch was applied in the livecd-tools repo[1] and that ended up in the 2.1[2] release. That version got to the tree[3] about 1 year ago, so this should be fixed since the beginning of this year.

 [1] - https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=df555689431ffecf4c965d43fd2f375b81679332
 [2] - https://gitweb.gentoo.org/proj/livecd-tools.git/tag/?h=2.1
 [3] - https://gitweb.gentoo.org/repo/gentoo.git/commit/app-misc/livecd-tools?id=4d953345149cdd31eb79917668bc0d621dd894f5