Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 454728

Summary: app-misc/livecd-tools - /sbin/livecd-functions.sh expects /sbin/ifconfig
Product: Gentoo Release Media Reporter: fdupoux <gentoobugs>
Component: LiveCD/DVD/USBAssignee: Gentoo LiveCD Package Maintainers <livecd>
Status: RESOLVED FIXED    
Severity: normal CC: zerochaos
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.sysresccd.org/forums/viewtopic.php?f=13&t=4967
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix net-setup in livecd-tools-2.0.2

Description fdupoux 2013-01-30 19:29:04 UTC
net-setup is broken in livecd-tools-2.0.2:
- ifconfig has moved from /sbin/ to /sbin/
- eval or dialog changed the behavior for quote handling

Reproducible: Always
Comment 1 fdupoux 2013-01-30 19:30:04 UTC
Created attachment 337330 [details, diff]
Fix net-setup in livecd-tools-2.0.2
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-24 20:59:13 UTC
Index: livecd-functions.sh
===================================================================
RCS file: /var/cvsroot/gentoo/src/livecd-tools/livecd-functions.sh,v
retrieving revision 1.27
diff -u -B -r1.27 livecd-functions.sh
--- livecd-functions.sh 9 Aug 2006 14:41:03 -0000       1.27
+++ livecd-functions.sh 24 Feb 2013 20:57:24 -0000
@@ -26,6 +26,11 @@
        fi
 }

+ifconfig() {
+       [ -x /bin/ifconfig ] && /bin/ifconfig ${@}
+       [ -x /sbin/ifconfig ] && /sbin/ifconfig ${@}
+}
+
 livecd_get_cmdline() {
        echo "0" > /proc/sys/kernel/printk
        CMDLINE="$(cat /proc/cmdline)"
@@ -241,7 +246,7 @@     
                        GATEWAY="$(cat ${iface}.GW)"
                        dialog --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS              
                        DNS="$(cat ${iface}.DNS)"
-                       /sbin/ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
+                       ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK}
                        if [ -n "${GATEWAY}" ]
                        then    
                                /sbin/route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1
@@ -378,7 +383,7 @@
        local opts
        IFS="
 "
-       for ifname in $(/sbin/ifconfig -a | grep "^[^ ]"); do
+       for ifname in $(ifconfig -a | grep "^[^ ]"); do
                ifname="${ifname%% *}"
                [[ ${ifname} == "lo" ]] && continue
                opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'"

This might work better in the long run. lspci and iwconfig should probably get the same treatment.
Comment 3 SpanKY gentoo-dev 2013-11-30 20:55:15 UTC
this has been fixed in the latest git.  just needs a new release made.
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2014-05-31 20:19:44 UTC
release 2.0.4 has been made