--- lib/libstand/bootp.c.orig 2015-07-29 08:38:28.970379976 +0200 +++ lib/libstand/bootp.c 2015-07-29 09:08:59.747891922 +0200 @@ -383,8 +383,20 @@ bcopy(cp, &rootip.s_addr, sizeof(swapip.s_addr)); } if (tag == TAG_ROOTPATH) { - strncpy(rootpath, (char *)cp, sizeof(rootpath)); - rootpath[size] = '\0'; + /* + * XXX Set dhcp.root-path.override to force rootpath + * locally and ignore BOOTP vendor tag 17 (root-path) + */ + char *rootpath_o = getenv("dhcp.root-path.override"); + if (rootpath_o == NULL) { + strncpy(rootpath, (char *)cp, sizeof(rootpath)); + rootpath[size] = '\0'; + /* printf("vend_rfc1048: rootpath set from BOOTP: %s\n", rootpath); */ + } + else { + strcpy(rootpath, rootpath_o); + /* printf("vend_rfc1048: rootpath set to: %s\n", rootpath); */ + } } if (tag == TAG_HOSTNAME) { strncpy(hostname, (char *)cp, sizeof(hostname));