Re: [SSI-devel] OpenSSI 1.0.0-rc4 dhcpd.conf etherboot options
Brought to you by:
brucewalker,
rogertsang
From: Richard B. <ric...@hp...> - 2004-04-19 21:58:17
|
>> The patch below fixes the tabbing and reformats the comments a bit. >> If you like it, I'll check it in. No, it appears that when the proposed config file of /etc/dhcpd.conf.d/node3 exists and is populated, /sbin/mkdhcpd.conf fails with this patch. The problem seems to come from the usage of $_. + if (open NODEOPTS, "< /etc/dhcpd.conf.d/node$_->{NODE}") { + local $/; + while (<NODEOPTS>) { + $tmp .= "\t\t\t$_"; + } + close NODEOPTS; + } Error report at the bottom of this email along with contents of node3 and a couple of straces. * The comments on your patch look good. * You might want to turn off "slurp mode": local $/; I, being a novice at Perl, found that slurp mode was the easiest (quickest) to bring in the .cfg file. * The above patch needs to be fixed or you can apply the previous patch (which lacks correct tabbing and will soon be replaced by the TODO item which will use a table file instead of a config directory). I will proceed to implement the TODO item which is to have a config file such as : # File /etc/dhcp.nodeparms # Description: Table of kernel parameters required for nodes that require parms. This # table will have the same entries whether the node PXE boots or Etherboots 3 mem=exactmap mem=640K@0 mem=255M@1M I'll report back when I get a working model. Sincerely, Richard Black # The following does have a "/etc/dhcpd.conf.d/node3" file [root@localhost sbin]# ./mkdhcpd.conf Use of uninitialized value in string eq at ./mkdhcpd.conf line 87. Use of uninitialized value in string eq at ./mkdhcpd.conf line 87. mkdhcpd.conf: fatal error: BUG: Invalid boot protocol at ./mkdhcpd.conf line 92. # The following does have a "/etc/dhcpd.conf.d/node3" file [root@localhost sbin]# strace ./mkdhcpd.conf <snip> open("/etc/dhcpd.conf.d/node1", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/etc/dhcpd.conf.d/node2", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/etc/dhcpd.conf.d/node3", O_RDONLY|O_LARGEFILE) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbffff0f8) = -1 ENOTTY (Inappropriate ioctl for device) _llseek(3, 0, [0], SEEK_CUR) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 read(3, "option option-128 = E4:45:74:68:"..., 4096) = 98 read(3, "", 4096) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0 close(3) = 0 write(2, "Use of uninitialized value in st"..., 67Use of uninitialized value in string eq at ./mkdhcpd.conf line 85. ) = 67 write(2, "Use of uninitialized value in st"..., 67Use of uninitialized value in string eq at ./mkdhcpd.conf line 85. ) = 67 write(2, "mkdhcpd.conf: fatal error:\n", 27mkdhcpd.conf: fatal error: ) = 27 write(2, " BUG: Invalid boot protocol at "..., 56 BUG: Invalid boot protocol at ./mkdhcpd.conf line 90. ) = 56 exit_group(9) = ? [root@localhost sbin]# # The following has no "/etc/dhcpd.conf.d/node3" file [root@localhost sbin]# strace ./mkdhcpd.conf <snip> open("/etc/dhcpd.conf.d/node1", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/etc/dhcpd.conf.d/node2", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/etc/dhcpd.conf.d/node3", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/etc/dhcpd.conf", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbffff278) = -1 ENOTTY (Inappropriate ioctl for device) _llseek(3, 0, [0], SEEK_CUR) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 write(3, "# /etc/dhcpd.conf\n#\n# Do _not_ e"..., 244) = 244 pipe([4, 5]) = 0 pipe([6, 7]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|0x11, <ignored>, <ignored>, 0x4000dfe8) = 77263 close(7) = 0 close(5) = 0 read(6, "", 4) = 0 close(6) = 0 ioctl(4, SNDCTL_TMR_TIMEBASE, 0xbffff1e8) = -1 EINVAL (Invalid argument) _llseek(4, 0, 0xbffff220, SEEK_CUR) = -1 ESPIPE (Illegal seek) fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 read(4, "Internet Software Consortium DHC"..., 4096) = 930 _llseek(4, 49, 0xbffff230, SEEK_SET) = -1 ESPIPE (Illegal seek) close(4) = 0 rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 waitpid(77263, [WIFEXITED(s) && WEXITSTATUS(s) == 1], 0) = 77263 rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0 rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0 write(3, "\nddns-update-style ad-hoc;\n\nsubn"..., 410) = 410 close(3) = 0 exit_group(0) = ? [root@localhost sbin]# #Contents of /etc/dhcpd.conf.d/node3: [root@localhost p]# cat /etc/dhcpd.conf.d/node3 option option-128 = E4:45:74:68:00:00; option option-129 = "mem=exactmap mem=640K@0 mem=255M@1M"; [root@localhost p]# |