Re: osql: warning: no DNS hostname found for "192.168.10.153"
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 15 Jan 2013 12:45:31 +1300 Jochen Daum <[email protected]> wrote: > looking for [freshco] in /usr/local/etc/freetds.conf > found this section: > [freshco] > host = 192.168.10.153 > ;host = vm > port = 1433 > tds version = 7.1 > looking up hostname for ip address 192.168.10.153 > osql: warning: no DNS hostname found for "192.168.10.153" > Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time] > [-R number] [-m flag] hostname [server] > > > I have also added > 192.168.10.153 vm > to /etc/hosts, but it cannot be resolved either > > Any idea, why I can't use an IP address here? You can use an IP address. You found a bug in osql. Thanks for reporting it. The attached patch corrects it, as will the version of osql in the next nightly snapshot. When $ host 192.168.10.153 returns an error, e.g., Host 153.10.168.192.in-addr.arpa. not found: 3(NXDOMAIN) the string "domain" doesn't occur in the output because the address has no name. In osql, the logic of looking for the address's name destroys the contents of the variable HOST. When that (now empty) variable is passed to host(1) a few lines later, it returns an error and the script aborts. > P.S: When there is no space either side of the = on the host line, I > get "no host line found" I looked at that, too. All uses of awk(1) to split a line on the '=' sign now permit missing spaces on either side of it. Previously osql was inconsistently stricter about whitespace. Many Linux distributions, including e.g. Ubuntu, use mawk, which does not recognize POSIX character classes, cf. https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/69724. For that reason, osql now allows any number of ASCII space characters (U+0020) but not other whitespace e.g. TAB. HTH. --jkl _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
t
(application/octet-stream, 635 B) - not displayed