<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: /sbin/ifup: line 268: [: : integer expression expected in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545538#M87155</link>
    <description>If it's up to date, it'll be something like this:&lt;BR /&gt;&lt;BR /&gt;    # DHCP likes to create duplicate routes.  Fix that up.&lt;BR /&gt;    NUMDEFROUTES=`ip -o route | \&lt;BR /&gt;                  grep "^default" | \&lt;BR /&gt;                  awk '{ nlines++ } END { print nlines }'`&lt;BR /&gt;    if [ -n "$NUMDEFROUTES" -a "$NUMDEFROUTES" -gt 1 ]; then&lt;BR /&gt;        # remove the default route for the new device (old route wins)&lt;BR /&gt;        ip route del default dev ${DEVICE}&lt;BR /&gt;    fi&lt;BR /&gt;# end dynamic device configuration&lt;BR /&gt;&lt;BR /&gt;Which would mean that therere absolutely *NO* default routes, the '"$NUMDEFROUTES" -gt 1' section failed.&lt;BR /&gt;&lt;BR /&gt;Why aren't there any default routes?&lt;BR /&gt;&lt;BR /&gt;In any case, the fix is to alter the NUMDEFROUTES= line to:&lt;BR /&gt;    NUMDEFROUTES=`ip -o route | \&lt;BR /&gt;                  grep "^default" | \&lt;BR /&gt;                  awk 'BEGIN { nlines = 0 } { nlines++ } END { print nlines }'`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This forces NUMDEFROUTES to have an interger value, regardless of whether there is or is not any default routes.</description>
    <pubDate>Mon, 16 May 2005 20:53:46 GMT</pubDate>
    <dc:creator>Stuart Browne</dc:creator>
    <dc:date>2005-05-16T20:53:46Z</dc:date>
    <item>
      <title>/sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545536#M87153</link>
      <description>Hello Dear Gurus&lt;BR /&gt;OS of dhcp client: rhl 9&lt;BR /&gt;OS of dhcp server: rhl 9&lt;BR /&gt;&lt;BR /&gt;cat /etc/sysconfig/network-scripts/ifcfg-eth0&lt;BR /&gt;DEVICE=eth0&lt;BR /&gt;ONBOOT=yes&lt;BR /&gt;BOOTPROTO=dhcp&lt;BR /&gt;&lt;BR /&gt;#ifdown eth0; ifup eth0&lt;BR /&gt;&lt;BR /&gt;Determinig Ip info for eth0... done.&lt;BR /&gt;/sbin/ifup: line 268: [: : integer expression expected&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;although dhcp clients gets all ip info from dhcp server suucesfuly, but the mesage "/sbin/ifup: line 268: [: : integer expression expected " seem odd to me.&lt;BR /&gt;I wana know what does this messege means ? is this an error/warning ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Maaz&lt;BR /&gt;</description>
      <pubDate>Mon, 16 May 2005 13:15:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545536#M87153</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-05-16T13:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545537#M87154</link>
      <description>ifup is just a script, so there is some misconfiguration in your system that leads to this error in this script.&lt;BR /&gt;&lt;BR /&gt;Can you please post here a few lines before and after line 268?</description>
      <pubDate>Mon, 16 May 2005 15:08:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545537#M87154</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-05-16T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545538#M87155</link>
      <description>If it's up to date, it'll be something like this:&lt;BR /&gt;&lt;BR /&gt;    # DHCP likes to create duplicate routes.  Fix that up.&lt;BR /&gt;    NUMDEFROUTES=`ip -o route | \&lt;BR /&gt;                  grep "^default" | \&lt;BR /&gt;                  awk '{ nlines++ } END { print nlines }'`&lt;BR /&gt;    if [ -n "$NUMDEFROUTES" -a "$NUMDEFROUTES" -gt 1 ]; then&lt;BR /&gt;        # remove the default route for the new device (old route wins)&lt;BR /&gt;        ip route del default dev ${DEVICE}&lt;BR /&gt;    fi&lt;BR /&gt;# end dynamic device configuration&lt;BR /&gt;&lt;BR /&gt;Which would mean that therere absolutely *NO* default routes, the '"$NUMDEFROUTES" -gt 1' section failed.&lt;BR /&gt;&lt;BR /&gt;Why aren't there any default routes?&lt;BR /&gt;&lt;BR /&gt;In any case, the fix is to alter the NUMDEFROUTES= line to:&lt;BR /&gt;    NUMDEFROUTES=`ip -o route | \&lt;BR /&gt;                  grep "^default" | \&lt;BR /&gt;                  awk 'BEGIN { nlines = 0 } { nlines++ } END { print nlines }'`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This forces NUMDEFROUTES to have an interger value, regardless of whether there is or is not any default routes.</description>
      <pubDate>Mon, 16 May 2005 20:53:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545538#M87155</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-05-16T20:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545539#M87156</link>
      <description>Thanks Alex, and Stuart, for the help.&lt;BR /&gt;I m at home, so i'll reply when i m at office.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Maaz</description>
      <pubDate>Tue, 17 May 2005 00:14:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545539#M87156</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-05-17T00:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545540#M87157</link>
      <description>Probably it is a bug. This message appears in the log file when there is no default route.&lt;BR /&gt;Check out the following link:&lt;BR /&gt;&lt;A href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=102199" target="_blank"&gt;https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=102199&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;At first try to set default gw on your system.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sergejs</description>
      <pubDate>Tue, 17 May 2005 01:04:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545540#M87157</guid>
      <dc:creator>Sergejs Svitnevs</dc:creator>
      <dc:date>2005-05-17T01:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545541#M87158</link>
      <description>&lt;BR /&gt;It should work regardless of whether route information is given or not. have you done any manual editing of files in network-scripts directory.&lt;BR /&gt;&lt;BR /&gt;better would be to re-run netconfig which will present you with a text based user interface for you to give network related information.&lt;BR /&gt;&lt;BR /&gt;once it is configured restart network service by, service network restart, command.&lt;BR /&gt;&lt;BR /&gt;And if you are still getting the error then go by other memberÂ´s reply of editing the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Go</description>
      <pubDate>Tue, 17 May 2005 01:19:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545541#M87158</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-05-17T01:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545542#M87159</link>
      <description>As he's using DHCP, it's not his local network settings at fault.&lt;BR /&gt;&lt;BR /&gt;It's the settings of the DHCP server, not forking over a 'router' (default route).</description>
      <pubDate>Tue, 17 May 2005 03:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545542#M87159</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-05-17T03:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: /sbin/ifup: line 268: [: : integer expression expected</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545543#M87160</link>
      <description>Thanks Dear Alex Lavrov, Stuart Browne, Sergejs Svitnevs, and Gopi Sekar  for the help.&lt;BR /&gt;&lt;BR /&gt;I folowed the instructions provided by Stuart Browne, and this "/sbin/ifup: line 268: [: : integer expression expected" message GONE. ;)&lt;BR /&gt;&lt;BR /&gt;Solution:&lt;BR /&gt;--------&lt;BR /&gt;Either dhcp server provides Default Gateways ip, or if dhcp server doesnt provides the Gateways ip then edit the /sbin/ifup as Stuart has instruct, this mesage wont recieve ;)&lt;BR /&gt;&lt;BR /&gt;Thanks to every1 a lot &lt;BR /&gt;Regards&lt;BR /&gt;Maaz</description>
      <pubDate>Tue, 17 May 2005 13:18:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sbin-ifup-line-268-integer-expression-expected/m-p/3545543#M87160</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-05-17T13:18:41Z</dc:date>
    </item>
  </channel>
</rss>

