Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#3401 - The network-profiles menu selects a network-profile named "bin" no matter what is selected

Attached to Project: Arch Linux
Opened by Luke Hoersten (lhoerste) - Sunday, 30 October 2005, 02:28 GMT
Last edited by Judd Vinet (judd) - Tuesday, 01 November 2005, 20:24 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The network-profile menu always tries to load /etc/network-profiles/bin no matter what I select in the menu. If that profile doesn't exist, its hard to see the error whiel the boot process is scrolling past and you wont have internet.
This task depends upon

Closed by  Judd Vinet (judd)
Wednesday, 07 December 2005, 18:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed by the latest GPM package.
Comment by Judd Vinet (judd) - Tuesday, 01 November 2005, 20:24 GMT
Are you using NET_PROFILES in rc.conf? If so, please attach your rc.conf so I can see it.
Comment by Luke Hoersten (lhoerste) - Tuesday, 01 November 2005, 20:40 GMT
NET_PROFILES=(menu)
Comment by Strabla Ruggero (Ermak) - Friday, 02 December 2005, 22:41 GMT
I have the same problem. When my system boots, network tries to load /etc/network-profiles/ATI-LICENSE.txt. I think the problem is in /usr/bin/netcfg from package initscripts. I think that the bugged (?) code is here (line 201 to 208):

ANSWER=`mktemp`

if [ "$TIMEOUT" != "" ]; then
dialog \
--timeout $TIMEOUT \
--default-item $DEFAULT \
--menu "Select the network profile you wish to use\n\n (timeout in $TIMEOUT seconds)" \
13 50 6 \
"${profiles[@]}" 2>$ANSWER
ret=$?
else
dialog \
--default-item $DEFAULT \
--menu "Select the network profile you wish to use" \
13 50 6 \
"${profiles[@]}" 2>$ANSWER
ret=$?
fi

At boot $ANSWER is wrong. When I restart network (/etc/rc.d/network restart) sometimes It's correct, sometimes not (and not always ATI-LICENSE.txt..). If I don't use "menu" but I put a network profiles name in /etc/rc.conf It always works.
I hope to have been useful, archlinux is great! Bye bye

Strabla Ruggero (Ermak)
Comment by Judd Vinet (judd) - Monday, 05 December 2005, 19:34 GMT
/etc/network-profiles is only supposed to contain actual network profiles. Why is ATI-LICENSE.txt in there?
Comment by Luke Hoersten (lhoerste) - Tuesday, 06 December 2005, 02:26 GMT
He doesn't have a /etc/network-profiles/ATI-LICENSE.txt file just as I dont have a /etc/network-profiles/bin file but that is what the menu is looking for. This loading of uncalled for files is the initial problem.
Comment by Strabla Ruggero (Ermak) - Tuesday, 06 December 2005, 20:55 GMT
Hi, ATI_LICENSE.TXT (this is the correct filename, not ATI-LICENSE.txt) was in my root filesystem (/ not /root) (I know, that file must not to be there, I have moved it). In /etc/network-profiles I have:

[root@orion ~]# ls /etc/network-profiles/
Casa Crema template
[root@orion ~]#

I can confirm that the problem appears on boot time, when the system is up and I restart network It usually works.

My profiles and rc.conf is attached.

(application/octet-stream)    Casa (1 KiB)
(application/octet-stream)    Crema (0.8 KiB)
(application/octet-stream)    rc.conf (2.7 KiB)
Comment by Strabla Ruggero (Ermak) - Tuesday, 06 December 2005, 22:52 GMT
Uh, a specification: dialog only showed (correctly) Casa & Crema profiles but, when I selected one of these, console told that /etc/network-profiles/ATI_LICENSE.TXT file was missing. That's why I think that $PROFILE_DIR in /usr/bin/netcfg is correct and $ANSWER, at boot time, not. Bye
Comment by Judd Vinet (judd) - Tuesday, 06 December 2005, 23:18 GMT
Perhaps mktemp is not working at boot-time. Try replacing the mktemp line with this:

ANSWER=`mktemp` || exit 1
Comment by Strabla Ruggero (Ermak) - Wednesday, 07 December 2005, 15:34 GMT
ANSWER is correct at boot time, I verificated that with some "echo $ANSWER > file" for debugging purpose. However I fixed the problem in two ways:
1)Upgrading gpm (and dialog) to last version (see http://bugs.archlinux.org/task/3568). That version contain a patch that, correctly, doesn't redirect to stderr a debug message when a dialog is launched. In old version of gpm, in the file created by mktemp there was that debug message (... 2>$ANSWER) plus the profile name, instead of only profile name.
2)With old version of gpm, It possible to work around the stderr problem lauching dialog with --stdout option and redirect stdout to $ANSWER: "${profiles[@]}" >$ANSWER

Bye bye.
Comment by Judd Vinet (judd) - Wednesday, 07 December 2005, 18:30 GMT
Ah, excellent. I knew about the gpm issue, but didn't think the two were related.

I'll close this bug now.

Loading...