Re: [master&rhel6-branch 1/2] Get netdev name without CONFIG_SYSFS_DEPRECATED_V2 in linuxrc.s390 (#596826)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack, applying.

On Sat, 5 Jun 2010, Steffen Maier wrote:

Linuxrc.s390 used to read the symlink net:<netdev> to get the name
of the just configured network device of type lcs or ctc.
This symlink only exists if the kernel is compiled with
CONFIG_SYSFS_DEPRECATED_V2.
Since more recent kernel are built without that option, we read
the content of directory 'net' which is another directory having the
name of the network device.
---
loader/linuxrc.s390 |   13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
index 7755e1d..093e38d 100644
--- a/loader/linuxrc.s390
+++ b/loader/linuxrc.s390
@@ -640,18 +640,11 @@ function set_device_online() {
        fi
    done
    if [ "$NETTYPE" = "lcs" -o "$NETTYPE" = "ctc" ]; then
-        # KH FIXME: Workaround for missing sysfs interface
-        #   DEVICE=$(cat /sys/devices/lcs/${SUBCHANNELS//,*/}/if_name)
-        # replaced with flexible solution:
-        # https://bugzilla.redhat.com/show_bug.cgi?id=204803#c9
-        # "sys/bus/ccwgroup/devices/${SUBCHANNEL}/net\:*
-        # for lcs after setting online"
-        if [ ! -h /sys/devices/${sysnettype}/$SCH_R_DEVBUSID/net:* ]; then
-            echo $"Device $SUBCHANNELS does not have required sysfs attribute 'net:*'"
+        if [ ! -d /sys/devices/${sysnettype}/$SCH_R_DEVBUSID/net ]; then
+            echo $"Device $SUBCHANNELS does not have required sysfs directory 'net'"
            return 1
        fi
-        DEVICE=$(echo /sys/devices/${sysnettype}/$SCH_R_DEVBUSID/net:*)
-        DEVICE=${DEVICE//*:/}
+        DEVICE=$(ls /sys/devices/${sysnettype}/$SCH_R_DEVBUSID/net/)
        if [ "$DEVICE" = "" ]; then
            echo $"Could not get device name for $SUBCHANNELS"
            return 1


--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux