[node-patches] Change in ovirt-node[master]: ovirt-init-functions: Grab 06 or 07 bytes for BOOTIF karg

fabiand at redhat.com fabiand at redhat.com
Wed Mar 18 16:55:26 UTC 2015


Fabian Deutsch has posted comments on this change.

Change subject: ovirt-init-functions: Grab 06 or 07 bytes for BOOTIF karg
......................................................................


Patch Set 5:

(1 comment)

See my inline comment

https://gerrit.ovirt.org/#/c/38454/5/scripts/ovirt-init-functions.sh.in
File scripts/ovirt-init-functions.sh.in:

Line 463:                 number_of_dash=$(echo $i | tr "-" "\n" | wc -l)
Line 464:                 if [ ${number_of_dash} -eq 7 ]
Line 465:                 then
Line 466:                     i=${i#??-}
Line 467:                 fi
I believe we can also use:

    i=${i:0-17}

This should work for both cases, please try:

    # The long case:
    $ export M="99:00:11:22:33:44:55" ; echo ${M:0-17}
00:11:22:33:44:55

    # The normal case:
    $ export M="00:11:22:33:44:55" ; echo ${M:0-17}
00:11:22:33:44:55
Line 468:                 bootif=$(grep -il $(echo $i|sed 's/-/:/g') /sys/class/net/[ep]*/address|rev|cut -d/ -f2|rev)
Line 469:                 ;;
Line 470:             esac
Line 471:             ;;


-- 
To view, visit https://gerrit.ovirt.org/38454
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8bfcc8ddabc74ee67d1a175fd4824ed9173c0215
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list