Date: Sun, 9 Sep 2007 20:01:10 -0700 From: "Kian Mohageri" <kian.mohageri@gmail.com> To: freebsd-ports <freebsd-ports@freebsd.org> Subject: Properly supporting devfs(8) rules in rc-scripts Message-ID: <fee88ee40709092001s45b2354bg7804e8d5d30c0006@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
------=_Part_12609_26145318.1189393270931 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've set up isc-dhcpd to run chroot(2)ed, and I noticed that the port's rc-script does not currently support devfs rulesets (so, by default, none of the device nodes are hidden within the chroot environment). Attached is a diff to introduce a variable, dhcpd_devfs_ruleset, to be applied within the chroot environment so as to hide all unnecessary nodes. However, I am not sure if this is the proper way to do this, and I had a few questions for more experienced users. Hopefully this is the right place, rather than freebsd-rc@... - Is it incorrect to use devfs_domount (from rc.subr)? I don't see it being used anywhere else other than /etc/rc.d/named and I'm guessing it may be new and unavailable on older hosts. - Would it be better to leave out the variable and just hide everything that isn't needed? Suggestions would be greatly appreciated. -Kian ------=_Part_12609_26145318.1189393270931 Content-Type: application/octet-stream; name="isc-dhcpd.in.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="isc-dhcpd.in.diff" X-Attachment-Id: f_f6ee06s3 LS0tIGlzYy1kaGNwZC5pbglTdW4gTm92ICA1IDAzOjI3OjAxIDIwMDYKKysrIGlzYy1kaGNwZC5p bi5uZXcJU3VuIFNlcCAgOSAxOToxMTo1OSAyMDA3CkBAIC0zMyw2ICszMyw3IEBACiAKIGRoY3Bk X2Nocm9vdF9lbmFibGU9JHtkaGNwZF9jaHJvb3RfZW5hYmxlOi0iTk8ifQkjIHJ1bnMgY2hyb290 ZWQ/CiBkaGNwZF9kZXZmc19lbmFibGU9JHtkaGNwZF9kZXZmc19lbmFibGU6LSJZRVMifQkJIyBk ZXZmcyBpZiBhdmFpbGFibGU/CitkaGNwZF9kZXZmc19ydWxlc2V0PSR7ZGhjcGRfZGV2ZnNfcnVs ZXNldDotfSAJCSMgZGV2ZnMgcnVsZXNldCB0byBhcHBseQogZGhjcGRfbWFrZWRldl9lbmFibGU9 JHtkaGNwZF9tYWtlZGV2X2VuYWJsZTotIk5PIn0JIyBNQUtFREVWIGluc3RlYWQgb2YgZGV2ZnM/ CiBkaGNwZF9yb290ZGlyPSR7ZGhjcGRfcm9vdGRpcjotL3Zhci9kYi8ke25hbWV9fQkJIyBkaXJl Y3RvcnkgdG8gcnVuIGluCiBkaGNwZF9pbmNsdWRlZGlyPSR7ZGhjcGRfaW5jbHVkZWRpcjotfQkJ CSMgZGlyZWN0b3J5IGZvciBpbmNsdWRlZCBjb25maWcgZmlsZXMKQEAgLTQ4MCw3ICs0ODEsNyBA QAogCQlzYWZlX21rZGlyICR7X2RoY3BkX3Jvb3RkaXJ9ICR7X2RoY3BkX2V0Y2Rpcn0vXyAke19k aGNwZF9jb25mZGlyfQogCQkjIFhYWCAvXyBoYWNrISBzbywgLi4uL2V0YyBpcyByb290IG93bmVk LgogCQlpZiBjaGVja3llc25vIGRoY3BkX2RldmZzX2VuYWJsZTsgdGhlbgotCQkJc2FmZV9tb3Vu dCAke19kaGNwZF9kZXZkaXJ9CisJCQlkZXZmc19kb21vdW50ICR7X2RoY3BkX2RldmRpcn0gJHtk aGNwZF9kZXZmc19ydWxlc2V0fQogCQllbGlmIGNoZWNreWVzbm8gZGhjcGRfbWFrZWRldl9lbmFi bGU7IHRoZW4KIAkJCXNhZmVfY29weSAke2RoY3BkX2RldmRpcn0vJF9tZGV2ICR7X2RoY3BkX2Rl dmRpcn0vJF9tZGV2CiAJCQlzYWZlX3J1biAwIHNoIC1jICJjZCAke19kaGNwZF9kZXZkaXJ9ICYm IC4vJF9tZGV2IGphaWwgYnBmNCIK ------=_Part_12609_26145318.1189393270931--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fee88ee40709092001s45b2354bg7804e8d5d30c0006>