Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst After confirming the network setup sho...
details: https://anonhg.NetBSD.org/src/rev/30012f9dc601
branches: trunk
changeset: 500748:30012f9dc601
user: jmc <jmc%NetBSD.org@localhost>
date: Sun Dec 17 22:55:53 2000 +0000
description:
After confirming the network setup should be saved, make sure dhcp is enabled if it was used on install
diffstat:
distrib/utils/sysinst/net.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r 1b32896b4d4b -r 30012f9dc601 distrib/utils/sysinst/net.c
--- a/distrib/utils/sysinst/net.c Sun Dec 17 22:53:52 2000 +0000
+++ b/distrib/utils/sysinst/net.c Sun Dec 17 22:55:53 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.64 2000/10/11 23:47:56 fvdl Exp $ */
+/* $NetBSD: net.c,v 1.65 2000/12/17 22:55:53 jmc Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -856,6 +856,8 @@
{
char ans [5] = "y";
char ifconfig_fn [STRSIZE];
+ char to [STRSIZE];
+ char cmd [STRSIZE];
FILE *f;
if (!network_up)
@@ -940,8 +942,21 @@
}
fclose(f);
}
- }
-
+ } else {
+ strncpy(to, target_expand("/etc/rc.conf"), STRSIZE);
+ sprintf(cmd, "echo dhclient=YES >> %s", to);
+ if (logging)
+ (void)fprintf(log, "%s\n", cmd);
+ if (scripting)
+ (void)fprintf(script, "%s\n", cmd);
+ do_system(cmd);
+ sprintf(cmd, "echo dhclient_flags=\"%s\" >> %s", net_dev, to);
+ if (logging)
+ (void)fprintf(log, "%s\n", cmd);
+ if (scripting)
+ (void)fprintf(script, "%s\n", cmd);
+ do_system(cmd);
+ }
fflush(NULL);
}
Home |
Main Index |
Thread Index |
Old Index