From 576b6208d6defe240bfa2477d6dd19f1ed83bfaf Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 2 Sep 2019 05:23:45 +0200 Subject: Cleaned most of outdated stuff --- ...util-linux-2.11z-agetty-domainname-option.patch | 69 ---------------------- 1 file changed, 69 deletions(-) delete mode 100644 sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch (limited to 'sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch') diff --git a/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch b/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch deleted file mode 100644 index d94d8b8..0000000 --- a/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- util-linux-2.11z/login-utils/agetty.c 2002-07-29 09:36:42.000000000 +0200 -+++ util-linux-2.11z.O/login-utils/agetty-with-dns.c 2003-07-13 04:24:01.000000000 +0200 -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - #include "xstrncpy.h" - #include "nls.h" - -@@ -122,6 +123,17 @@ - #define BUFSIZ 1024 - #endif - -+/* set a maximum length for the hostname, */ -+#ifdef HOST_NAME_MAX -+ /* defined by POSIX */ -+ #define HOSTNAME_LENGTH HOST_NAME_MAX -+#elif defined(MAXHOSTNAMELEN) -+ /* implemented in current Unix-versions */ -+ #define HOSTNAME_LENGTH MAXHOSTNAMELEN -+#else -+ #define HOSTNAME_LENGTH 500 -+#endif -+ - /* - * When multiple baud rates are specified on the command line, the first one - * we will try is the first one specified. -@@ -878,7 +890,25 @@ - printf ("%s", domainname); - } - break; -- -+ -+ case 'O': -+ { -+ char *domain = NULL; -+ char host[HOSTNAME_LENGTH + 1]; -+ struct hostent *hp = NULL; -+ -+ if (gethostname(host, HOSTNAME_LENGTH) || !(hp = gethostbyname(host))) { -+ domain = " unknown_domain"; -+ } else { -+ /* get the substring after the first . */ -+ domain = strchr(hp->h_name, '.'); -+ if (domain == NULL) -+ domain = ".(none)"; -+ } -+ printf("%s", ++domain); -+ } -+ break; -+ - case 'd': - case 't': - { ---- util-linux-2.11z/login-utils/agetty.8 1999-11-03 00:28:11.000000000 +0100 -+++ util-linux-2.11z.O/login-utils/agetty-with-dns.8 2003-07-13 04:27:17.000000000 +0200 -@@ -217,7 +217,10 @@ - Insert the nodename of the machine, also known as the hostname. - .TP - o --Insert the domainname of the machine. -+Insert the NIS domainname of the machine. -+.TP -+O -+Insert the DNS domainname of the machine. - .TP - r - Insert the release number of the OS, eg. 1.1.9. -- cgit v1.2.3