Index: branches/releng-9.0/nanobsd/files/etc/rc.d/named
===================================================================
--- branches/releng-9.0/nanobsd/files/etc/rc.d/named	(revision 10422)
+++ branches/releng-9.0/nanobsd/files/etc/rc.d/named	(revision 10423)
@@ -239,4 +239,6 @@
 			case "$line" in
 			'nameserver '*|'nameserver	'*)
+				# Make sure to strip the optional trailing comment
+				line=${line%%#*}
 				nsip=${line##nameserver[         ]}
 
