summaryrefslogtreecommitdiffhomepage
path: root/networking
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 /networking
parent872138de50b1c5bbf105b0243f5778fcb02b310b (diff)
Apply patch from "Orion Poplawski" <OPoplawski@cqg.com> to make
hostname do "--file" -Erik
Diffstat (limited to 'networking')
-rw-r--r--networking/hostname.c8
1 files changed, 7 insertions, 1 deletions
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 @@
/* 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);
}