aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-12 22:30:31 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-12 22:30:31 +0000
commit0d5835a7674e8f36a5669e567be32d53dff401ac (patch)
tree3c1d3bf709d7b38dbc74323c5eb2d5a339bca00b
parent872138de50b1c5bbf105b0243f5778fcb02b310b (diff)
downloadbusybox-w32-0d5835a7674e8f36a5669e567be32d53dff401ac.tar.gz
busybox-w32-0d5835a7674e8f36a5669e567be32d53dff401ac.tar.bz2
busybox-w32-0d5835a7674e8f36a5669e567be32d53dff401ac.zip
Apply patch from "Orion Poplawski" <OPoplawski@cqg.com> to make
hostname do "--file" -Erik
-rw-r--r--applets/usage.c2
-rw-r--r--docs/busybox.pod4
-rw-r--r--docs/busybox.sgml8
-rw-r--r--hostname.c8
-rw-r--r--networking/hostname.c8
-rw-r--r--usage.c2
6 files changed, 22 insertions, 10 deletions
diff --git a/applets/usage.c b/applets/usage.c
index 81f4cfc0e..51ab9a813 100644
--- a/applets/usage.c
+++ b/applets/usage.c
@@ -458,7 +458,7 @@ const char hostname_usage[] =
458 458
459 "\t-i\t\tAddresses for the hostname\n" 459 "\t-i\t\tAddresses for the hostname\n"
460 "\t-d\t\tDNS domain name\n" 460 "\t-d\t\tDNS domain name\n"
461 "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n" 461 "\t-F, --file FILE\tUse the contents of FILE to specify the hostname\n"
462#endif 462#endif
463 ; 463 ;
464#endif 464#endif
diff --git a/docs/busybox.pod b/docs/busybox.pod
index c9f71cfe7..49048171d 100644
--- a/docs/busybox.pod
+++ b/docs/busybox.pod
@@ -827,7 +827,7 @@ Options:
827 -s Short 827 -s Short
828 -i Addresses for the hostname 828 -i Addresses for the hostname
829 -d DNS domain name 829 -d DNS domain name
830 -F FILE Use the contents of FILE to specify the hostname 830 -F, --file FILE Use the contents of FILE to specify the hostname
831 831
832Example: 832Example:
833 833
@@ -2261,4 +2261,4 @@ Enrique Zanardi <ezanardi@ull.es>
2261 2261
2262=cut 2262=cut
2263 2263
2264# $Id: busybox.pod,v 1.74 2000/09/26 22:20:06 andersen Exp $ 2264# $Id: busybox.pod,v 1.75 2000/10/12 22:30:31 andersen Exp $
diff --git a/docs/busybox.sgml b/docs/busybox.sgml
index 9c38979b7..8b015d370 100644
--- a/docs/busybox.sgml
+++ b/docs/busybox.sgml
@@ -1397,10 +1397,10 @@
1397 1397
1398 <para> 1398 <para>
1399 <screen> 1399 <screen>
1400 -s Short 1400 -s Short
1401 -i Addresses for the hostname 1401 -i Addresses for the hostname
1402 -d DNS domain name 1402 -d DNS domain name
1403 -F FILE Use the contents of FILE to specify the hostname 1403 -F, --file FILE Use the contents of FILE to specify the hostname
1404 </screen> 1404 </screen>
1405 </para> 1405 </para>
1406 1406
diff --git a/hostname.c b/hostname.c
index 16a28ca43..44d529c83 100644
--- a/hostname.c
+++ b/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.14 2000/09/27 02:43:35 kraai Exp $ 3 * $Id: hostname.c,v 1.15 2000/10/12 22:30:31 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -89,6 +89,12 @@ int hostname_main(int argc, char **argv)
89 } 89 }
90 filename = *(++argv); 90 filename = *(++argv);
91 break; 91 break;
92 case '-':
93 if (strcmp(++(*argv), "file") || --argc ==0 ) {
94 usage(hostname_usage);
95 }
96 filename = *(++argv);
97 break;
92 default: 98 default:
93 usage(hostname_usage); 99 usage(hostname_usage);
94 } 100 }
diff --git a/networking/hostname.c b/networking/hostname.c
index 16a28ca43..44d529c83 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.14 2000/09/27 02:43:35 kraai Exp $ 3 * $Id: hostname.c,v 1.15 2000/10/12 22:30:31 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -89,6 +89,12 @@ int hostname_main(int argc, char **argv)
89 } 89 }
90 filename = *(++argv); 90 filename = *(++argv);
91 break; 91 break;
92 case '-':
93 if (strcmp(++(*argv), "file") || --argc ==0 ) {
94 usage(hostname_usage);
95 }
96 filename = *(++argv);
97 break;
92 default: 98 default:
93 usage(hostname_usage); 99 usage(hostname_usage);
94 } 100 }
diff --git a/usage.c b/usage.c
index 81f4cfc0e..51ab9a813 100644
--- a/usage.c
+++ b/usage.c
@@ -458,7 +458,7 @@ const char hostname_usage[] =
458 458
459 "\t-i\t\tAddresses for the hostname\n" 459 "\t-i\t\tAddresses for the hostname\n"
460 "\t-d\t\tDNS domain name\n" 460 "\t-d\t\tDNS domain name\n"
461 "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n" 461 "\t-F, --file FILE\tUse the contents of FILE to specify the hostname\n"
462#endif 462#endif
463 ; 463 ;
464#endif 464#endif