From owner-freebsd-ports@FreeBSD.ORG Mon Sep 10 03:26:01 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9670B16A41A for ; Mon, 10 Sep 2007 03:26:01 +0000 (UTC) (envelope-from kian.mohageri@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.234]) by mx1.freebsd.org (Postfix) with ESMTP id 3959F13C46C for ; Mon, 10 Sep 2007 03:26:01 +0000 (UTC) (envelope-from kian.mohageri@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so950373wxd for ; Sun, 09 Sep 2007 20:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=whWW89DZbLgW/KMURpHKgdO0DltZmHWzo6osX3v2C9E=; b=CYPR7lJ/irv025h6hI5BEDuxcZzmDsyA72FQttRGOF6et3XOJ+z8CiriEX6CXkQ2hctdRzdBT6kHg7YCTGnBn22zbhWKdz3SIE6GFCUfMqkEI/RA1e06Y8sehRF/bO7niAYiQN5ph1b7fy0N2xA+LSn9n0r1nj1Th5dmWdJVem8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=MinOfIzHcyohNZy7sEsLNRMzWCLzef++SxLv71yTMj+FksLXCRBI+CgwtLUpZRIUP9xJtH4Qkm2R0hAybguFTU+6qk3ImqCHOL8a0NcjtJLbxR8T2mm2DCANWFXd+t/eNeEe9i3a/bCnRTTEihVeBYz9Pbr91MNnMSMiwKSrWv0= Received: by 10.90.102.20 with SMTP id z20mr9346855agb.1189393270938; Sun, 09 Sep 2007 20:01:10 -0700 (PDT) Received: by 10.90.90.19 with HTTP; Sun, 9 Sep 2007 20:01:10 -0700 (PDT) Message-ID: Date: Sun, 9 Sep 2007 20:01:10 -0700 From: "Kian Mohageri" To: freebsd-ports MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12609_26145318.1189393270931" Subject: Properly supporting devfs(8) rules in rc-scripts X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2007 03:26:01 -0000 ------=_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 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