• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

GetIPadrress broken - fedora 20

Scheduled Pinned Locked Moved Solved
Bug Reports
2
3
1.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Enrico
    last edited by Jul 28, 2014, 7:47 AM

    Hi,
    fedora 20 ifconfig reports no ‘:’ that break getIPaddress.
    So, the groupmanager.log reports:

    7-25-14 9:45:11 am] * Checking if I am the group manager.
    [07-25-14 9:45:11 am] * I don’t appear to be the group manager, I will check back later. log
    [07-25-14 9:45:11 am] * Checking if I am the group manager.
    [07-25-14 9:45:11 am] * I don’t appear to be the group manager, I will check back later.

    I used more standard ‘ip’ command (tested on ubuntu too):
    FOGCore.class.php

    369c369
    < exec(“ip -4 -o address|awk ‘{print $4}’|sed ‘s//.*//’”, $arR, $retVal);

              exec("/sbin/ifconfig | grep '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'| cut -d':' -f 2 | cut -d' ' -f1", $arR, $retVal);
    

    Ciao
    Enrico

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jul 28, 2014, 10:19 AM

      I don’t understand the issue.
      the ifconfig is attempting to use standard methods to get the ipaddress, and while the ip -4 -o address may work in a couple cases I’m not 100% sure that this works on all cases of linux.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • E
        Enrico
        last edited by Jul 28, 2014, 10:44 AM

        Sorry, I attach the fedora 20 output:
        [B]em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet x.x.x.x netmask 255.255.255.224 broadcast x.x.x.y[/B]
        As you can see, there is not a ‘:’ but the source code search for it:
        exec(“/sbin/ifconfig | grep ‘[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}’|[B] cut -d’:’ -f 2[/B] | cut -d’ ’ -f1”, $arR, $retVal);
        so the outuput is null…
        Ciao
        Enrico

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          3/3
          Last post

        175

        Online

        12.1k

        Users

        17.3k

        Topics

        155.3k

        Posts
        Copyright © 2012-2024 FOG Project