Apply patch from "Orion Poplawski" <OPoplawski@cqg.com> to make
authorEric Andersen <andersen@codepoet.org>
Thu, 12 Oct 2000 22:30:31 +0000 (22:30 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 12 Oct 2000 22:30:31 +0000 (22:30 -0000)
hostname do "--file"
 -Erik

applets/usage.c
docs/busybox.pod
docs/busybox.sgml
hostname.c
networking/hostname.c
usage.c

index 81f4cfc0e9d66f8a5e47b0e1a892ba54a22b5723..51ab9a813146af620b12640c52d4a0ac7594875b 100644 (file)
@@ -458,7 +458,7 @@ const char hostname_usage[] =
 
        "\t-i\t\tAddresses for the hostname\n"
        "\t-d\t\tDNS domain name\n"
-       "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n"
+       "\t-F, --file FILE\tUse the contents of FILE to specify the hostname\n"
 #endif
        ;
 #endif
index c9f71cfe7ea17a9571c46072048897eba1f0266b..49048171da372a5cec9f419530135ce0f8640907 100644 (file)
@@ -827,7 +827,7 @@ Options:
        -s              Short
        -i              Addresses for the hostname
        -d              DNS domain name
-       -F FILE         Use the contents of FILE to specify the hostname
+       -F, --file FILE Use the contents of FILE to specify the hostname
 
 Example:
 
@@ -2261,4 +2261,4 @@ Enrique Zanardi <ezanardi@ull.es>
 
 =cut
 
-# $Id: busybox.pod,v 1.74 2000/09/26 22:20:06 andersen Exp $
+# $Id: busybox.pod,v 1.75 2000/10/12 22:30:31 andersen Exp $
index 9c38979b7fee7098e7e6fb6f3458a394ae71bd28..8b015d370e3344bca6f196c2208fd3e6372f1174 100644 (file)
 
                <para>
                <screen>
-                       -s      Short
-                       -i      Addresses for the hostname
-                       -d      DNS domain name
-                       -F FILE Use the contents of FILE to specify the hostname
+                       -s              Short
+                       -i              Addresses for the hostname
+                       -d              DNS domain name
+                       -F, --file FILE Use the contents of FILE to specify the hostname
                </screen>
                </para>
 
index 16a28ca43dacaa135aa74d42e9f5ce5da81a3430..44d529c83fc287e2625fc658bdbe5b282d6b61fc 100644 (file)
@@ -1,6 +1,6 @@
 /* vi: set sw=4 ts=4: */
 /*
- * $Id: hostname.c,v 1.14 2000/09/27 02:43:35 kraai Exp $
+ * $Id: hostname.c,v 1.15 2000/10/12 22:30:31 andersen Exp $
  * Mini hostname implementation for busybox
  *
  * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -89,6 +89,12 @@ int hostname_main(int argc, char **argv)
                                }
                                filename = *(++argv);
                                break;
+                       case '-':
+                               if (strcmp(++(*argv), "file") || --argc ==0 ) {
+                                       usage(hostname_usage);
+                               }
+                               filename = *(++argv);
+                               break;
                        default:
                                usage(hostname_usage);
                        }
index 16a28ca43dacaa135aa74d42e9f5ce5da81a3430..44d529c83fc287e2625fc658bdbe5b282d6b61fc 100644 (file)
@@ -1,6 +1,6 @@
 /* vi: set sw=4 ts=4: */
 /*
- * $Id: hostname.c,v 1.14 2000/09/27 02:43:35 kraai Exp $
+ * $Id: hostname.c,v 1.15 2000/10/12 22:30:31 andersen Exp $
  * Mini hostname implementation for busybox
  *
  * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -89,6 +89,12 @@ int hostname_main(int argc, char **argv)
                                }
                                filename = *(++argv);
                                break;
+                       case '-':
+                               if (strcmp(++(*argv), "file") || --argc ==0 ) {
+                                       usage(hostname_usage);
+                               }
+                               filename = *(++argv);
+                               break;
                        default:
                                usage(hostname_usage);
                        }
diff --git a/usage.c b/usage.c
index 81f4cfc0e9d66f8a5e47b0e1a892ba54a22b5723..51ab9a813146af620b12640c52d4a0ac7594875b 100644 (file)
--- a/usage.c
+++ b/usage.c
@@ -458,7 +458,7 @@ const char hostname_usage[] =
 
        "\t-i\t\tAddresses for the hostname\n"
        "\t-d\t\tDNS domain name\n"
-       "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n"
+       "\t-F, --file FILE\tUse the contents of FILE to specify the hostname\n"
 #endif
        ;
 #endif