Avoid to concatenate extra leading slash TODO: All usage of set_dir_bin and set_dir_src should be okay except the TODO: following one in util.c: TODO: TODO: 538 /* If root is not md(4) and we have set dir, skip this step. */ TODO: 539 mib[0] = CTL_KERN; TODO: 540 mib[1] = KERN_ROOT_DEVICE; TODO: 541 varlen = sizeof(rootdev); TODO: 542 (void)sysctl(mib, 2, rootdev, &varlen, NULL, 0); TODO: 543 if (stat(set_dir_bin, &sb) == 0 && S_ISDIR(sb.st_mode) && TODO: 544 strncmp("md", rootdev, 2) != 0) { TODO: 545 strlcpy(ext_dir_bin, set_dir_bin, sizeof ext_dir_bin); TODO: 546 strlcpy(ext_dir_src, set_dir_src, sizeof ext_dir_src); TODO: 547 return SET_OK; TODO: 548 } TODO: TODO: ..and the following in net.c: TODO: TODO: 1003 /* If root is on NFS and we have sets, skip this step. */ TODO: 1004 if (statvfs(set_dir_bin, &sb) == 0 && TODO: 1005 strcmp(sb.f_fstypename, "nfs") == 0) { TODO: 1006 strlcpy(ext_dir_bin, set_dir_bin, sizeof ext_dir_bin); TODO: 1007 strlcpy(ext_dir_src, set_dir_src, sizeof ext_dir_src); TODO: 1008 return SET_OK; TODO: 1009 } TODO: Index: main.c =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/main.c,v retrieving revision 1.11 diff -u -p -r1.11 main.c --- main.c 6 Oct 2018 18:45:37 -0000 1.11 +++ main.c 20 Oct 2018 11:54:10 -0000 @@ -94,8 +94,8 @@ static const struct f_arg fflagopts[] = {"ftp host", SYSINST_FTP_HOST, ftp.xfer_host[XFER_FTP], sizeof ftp.xfer_host[XFER_FTP]}, {"http host", SYSINST_HTTP_HOST, ftp.xfer_host[XFER_HTTP], sizeof ftp.xfer_host[XFER_HTTP]}, {"ftp dir", SYSINST_FTP_DIR, ftp.dir, sizeof ftp.dir}, - {"ftp prefix", "/" MACH "/binary/sets", set_dir_bin, sizeof set_dir_bin}, - {"ftp src prefix", "/source/sets", set_dir_src, sizeof set_dir_src}, + {"ftp prefix", MACH "/binary/sets", set_dir_bin, sizeof set_dir_bin}, + {"ftp src prefix", "source/sets", set_dir_src, sizeof set_dir_src}, {"ftp user", "ftp", ftp.user, sizeof ftp.user}, {"ftp pass", "", ftp.pass, sizeof ftp.pass}, {"ftp proxy", "", ftp.proxy, sizeof ftp.proxy},