https://bugzilla.novell.com/show_bug.cgi?id=386621
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=386621#c6
Ludwig Nussel changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Info Provider|lnussel@novell.com |
--- Comment #6 from Ludwig Nussel 2008-05-05 05:11:26 MST ---
The intention of this bug report is to get rid of a useless DNS roundtrip. It
caught my attention due to the mentioned other bug report but is independent of
that. HOST=${HOSTNAME%%.*} instead of that hostname -s call should suffice.
This is what /bin/hostname -s does for comparison:
gethostname(hname, sizeof(hname));
..
if (!(hp = gethostbyname(hname))) {
herror(program_name);
exit(1);
}
..
if (!(p = strchr(hp->h_name, '.')) && (c == 'd'))
return;
..
switch (c) {
..
case 's':
if (p != NULL)
*p = '\0';
printf("%s\n", hp->h_name);
break;
ie it tries to resolve the own hostname and then remove anything after the
first dot.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.