[klibc] [patch] ipconfig add dhcp file preseeding support
Geert Stappers
stappers at stappers.nl
Sun Jul 23 13:39:34 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, Jul 08, 2006 at 03:06:15PM +0200, Geert Stappers wrote:
> On Fri, Jul 07, 2006 at 09:18:25AM -0700, H. Peter Anvin wrote:
> >
> > Hi Geert,
> >
> > This patch came through HTML-botched...
> > >@@ -74,6 +74,7 @@ int bootp_parse(struct netdev *dev, stru
> > > dev->hostname[0] = '\0';
> > ^^^^
>
> attached a non-HTML-botched one
Below you find the filename patch again.
Could some one spend some time on feedback for it?
A simple 'applied' (or 'rejected' ) will do.
Cheers
Geert Stappers
diff -ru klibc-1.3.35-as-found/usr/kinit/ipconfig/netdev.h klibc-1.3.35/usr/kinit/ipconfig/netdev.h
- --- klibc-1.3.35-as-found/usr/kinit/ipconfig/netdev.h 2006-06-08 17:47:18.000000000 +0200
+++ klibc-1.3.35/usr/kinit/ipconfig/netdev.h 2006-07-08 14:33:24.000000000 +0200
@@ -9,6 +9,7 @@
#include <net/if.h>
#define BPLEN 40
+#define FNLEN 128 /* from RFC 2131, DHCP */
struct netdev {
const char *name; /* Device name */
@@ -42,6 +43,7 @@
char dnsdomainname[SYS_NMLN]; /* dns domain name */
char nisdomainname[SYS_NMLN]; /* nis domain name */
char bootpath[BPLEN]; /* boot path */
+ char filename[FNLEN]; /* filename */
struct netdev *next; /* next configured i/f */
};
diff -ru klibc-1.3.35-as-found/usr/kinit/ipconfig/bootp_proto.c klibc-1.3.35/usr/kinit/ipconfig/bootp_proto.c
- --- klibc-1.3.35-as-found/usr/kinit/ipconfig/bootp_proto.c 2006-06-08 17:47:18.000000000 +0200
+++ klibc-1.3.35/usr/kinit/ipconfig/bootp_proto.c 2006-07-08 14:36:18.000000000 +0200
@@ -74,6 +74,7 @@
dev->hostname[0] = '\0';
dev->nisdomainname[0] = '\0';
dev->bootpath[0] = '\0';
+ memcpy(&dev->filename, &hdr->boot_file, FNLEN);
if (extlen >= 4 && exts[0] == 99 && exts[1] == 130 &&
exts[2] == 83 && exts[3] == 99) {
diff -ru klibc-1.3.35-as-found/usr/kinit/ipconfig/main.c klibc-1.3.35/usr/kinit/ipconfig/main.c
- --- klibc-1.3.35-as-found/usr/kinit/ipconfig/main.c 2006-06-08 17:47:18.000000000 +0200
+++ klibc-1.3.35/usr/kinit/ipconfig/main.c 2006-07-08 14:29:08.000000000 +0200
@@ -71,6 +71,7 @@
printf(" nisdomain: %-64s\n", dev->nisdomainname);
printf(" rootserver: %s ", my_inet_ntoa(dev->ip_server));
printf("rootpath: %s\n", dev->bootpath);
+ printf(" filename : %s\n", dev->filename);
}
static void configure_device(struct netdev *dev)
@@ -112,6 +113,7 @@
fprintf(f, "NISDOMAIN=%s\n", dev->nisdomainname);
fprintf(f, "ROOTSERVER=%s\n", my_inet_ntoa(dev->ip_server));
fprintf(f, "ROOTPATH=%s\n", dev->bootpath);
+ fprintf(f, "FILENAME=%s\n", dev->filename);
fclose(f);
}
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFEw96FOSINbgwa/7sRAunxAKCbvqb88lqEAut1wfXzbOqZT64PMACeO+OC
gnM4Z2tv0SAUt2u8W/SBcMY=
=d9Nf
-----END PGP SIGNATURE-----
More information about the klibc
mailing list