rpms/net-tools/F-12 net-tools-1.60-hostname-short.patch, NONE, 1.1 net-tools-1.60-hostname_man.patch, 1.2, 1.3 net-tools.spec, 1.101, 1.102
Jiří Popelka
jpopelka at fedoraproject.org
Thu Oct 29 11:28:17 UTC 2009
- Previous message (by thread): rpms/qemu/devel qemu-properly-save-kvm-system-time-registers.patch, NONE, 1.1 qemu.spec, 1.144, 1.145
- Next message (by thread): rpms/net-tools/F-11 net-tools-1.60-hostname-short.patch, NONE, 1.1 net-tools-1.60-hostname_man.patch, 1.2, 1.3 net-tools.spec, 1.99, 1.100
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jpopelka
Update of /cvs/pkgs/rpms/net-tools/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21668
Modified Files:
net-tools-1.60-hostname_man.patch net-tools.spec
Added Files:
net-tools-1.60-hostname-short.patch
Log Message:
* Thu Oct 29 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-96
- Make "hostname -s" display host name cut at the first dot (no
matter if the host name resolves or not) (bug #531702)
net-tools-1.60-hostname-short.patch:
hostname.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- NEW FILE net-tools-1.60-hostname-short.patch ---
diff -up net-tools-1.60/hostname.c.hostname-short net-tools-1.60/hostname.c
--- net-tools-1.60/hostname.c.hostname-short 2009-09-30 17:44:21.000000000 +0200
+++ net-tools-1.60/hostname.c 2009-09-08 11:55:03.000000000 +0200
@@ -176,11 +176,6 @@ static void showhname(char *hname, int c
case 'f':
printf("%s\n", hp->h_name);
break;
- case 's':
- if (p != NULL)
- *p = '\0';
- printf("%s\n", hp->h_name);
- break;
default:
;
}
@@ -270,6 +265,7 @@ int main(int argc, char **argv)
char myname[MAXHOSTNAMELEN + 1] =
{0};
char *file = NULL;
+ char *p;
static const struct option long_options[] =
{
@@ -370,7 +366,13 @@ int main(int argc, char **argv)
if (!type)
printf("%s\n", myname);
else
- showhname(myname, type);
+ if (type == 's') {
+ if (p = strchr(myname, '.'))
+ *p = '\0';
+ printf("%s\n", myname);
+ }
+ else
+ showhname(myname, type);
break;
case 3:
if (file) {
net-tools-1.60-hostname_man.patch:
hostname.1 | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Index: net-tools-1.60-hostname_man.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/F-12/net-tools-1.60-hostname_man.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- net-tools-1.60-hostname_man.patch 2 Jan 2006 10:00:42 -0000 1.2
+++ net-tools-1.60-hostname_man.patch 29 Oct 2009 11:28:17 -0000 1.3
@@ -1,14 +1,14 @@
--- net-tools-1.60/man/en_US/hostname.1.gethostbyname 2005-10-14 11:33:41.000000000 +0200
+++ net-tools-1.60/man/en_US/hostname.1 2005-10-15 11:46:14.646697600 +0200
-@@ -99,6 +99,32 @@
+@@ -99,6 +99,33 @@
complete FQDN of the system is returned with
.BR "hostname \-\-fqdn" .
+.LP
+The function
+.BR gethostname(2)
-+is used to get the hostname. Only when the
-+.BR "hostname \-s"
++is used to get the hostname. When the
++.BR "hostname \-a, \-d, \-f or \-i"
+is called will
+.BR gethostbyname(3)
+be called. The difference in
@@ -25,7 +25,8 @@
+.IR /etc/sysconfig/network
+or
+.IR /etc/hosts
-+. To add another dimension to this,
++
++To add another dimension to this,
+the
+.B hostname
+is also set when the network interface is brought up.
Index: net-tools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/F-12/net-tools.spec,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -p -r1.101 -r1.102
--- net-tools.spec 1 Sep 2009 13:18:22 -0000 1.101
+++ net-tools.spec 29 Oct 2009 11:28:17 -0000 1.102
@@ -3,7 +3,7 @@
Summary: Basic networking tools
Name: net-tools
Version: 1.60
-Release: 95%{?dist}
+Release: 96%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://net-tools.berlios.de/
@@ -103,6 +103,9 @@ Patch76: net-tools-1.60-ib-warning.patch
# notes in man pages, saying that these tools are obsolete
Patch77: net-tools-1.60-man-obsolete.patch
+# Bug 531702: make "hostname -s" display host name cut at the first dot (no matter if the host name resolves or not)
+Patch78: net-tools-1.60-hostname-short.patch
+
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
@@ -190,6 +193,7 @@ Most of them are obsolete. For replaceme
%patch75 -p1 -b .debug-fix
%patch76 -p1 -b .ib-warning
%patch77 -p1 -b .man-obsolete
+%patch78 -p1 -b .hostname-short
cp %SOURCE2 ./config.h
cp %SOURCE3 ./config.make
@@ -311,6 +315,10 @@ exit 0
%{_sysconfdir}/rc.d/init.d/netplugd
%changelog
+* Thu Oct 29 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-96
+- Make "hostname -s" display host name cut at the first dot (no
+ matter if the host name resolves or not) (bug #531702)
+
* Tue Sep 1 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-95
- netstat - avoid name resolution for listening or established sockets (-l) by return fast.
- netstat - --continuous should flush stdout
- Previous message (by thread): rpms/qemu/devel qemu-properly-save-kvm-system-time-registers.patch, NONE, 1.1 qemu.spec, 1.144, 1.145
- Next message (by thread): rpms/net-tools/F-11 net-tools-1.60-hostname-short.patch, NONE, 1.1 net-tools-1.60-hostname_man.patch, 1.2, 1.3 net-tools.spec, 1.99, 1.100
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list