From owner-freebsd-arch@FreeBSD.ORG Thu Mar 4 14:40:06 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4105A16A4CE; Thu, 4 Mar 2004 14:40:06 -0800 (PST) Received: from darkness.comp.waw.pl (unknown [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8792B43D1D; Thu, 4 Mar 2004 14:40:05 -0800 (PST) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 72FD7ACDD0; Thu, 4 Mar 2004 23:40:03 +0100 (CET) Date: Thu, 4 Mar 2004 23:40:03 +0100 From: Pawel Jakub Dawidek To: arch@freebsd.org Message-ID: <20040304224003.GG10864@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sDKAb4OeUBrWWL6P" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: mtm@freebsd.org Subject: rcNG cleanups... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 22:40:06 -0000 --sDKAb4OeUBrWWL6P Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. While choosing scripts that are not usable inside jail, I've found few things that should be solved. 1. There are many scripts from NetBSD that are not instaled. Because we are not longer want to stay in sync with NetBSD's rcNG, we should remove them, as I susspect. 2. /etc/rc.d/routed script: if checkyesno gated && checkyesno routed; then warn "gated and routed both requested to be run: only running gated." return 1 fi We don't have gated, so this should be probably removed. I'm going to commit 'nojail' flag for scripts that I know are usless inside jail, there are still some scripts that I can't decide about this. Bigger change is for hostname script. Here it is: --- hostname 30 Jul 2003 18:53:59 -0000 1.3 +++ hostname 4 Mar 2004 22:38:33 -0000 @@ -39,12 +39,20 @@ stop_cmd=3D":" =20 hostname_start() { - # Set the host name if it is not already set + # If we are not inside jail, set the host name if it is not already set. + # If we are inside jail set host name even if it is already set, + # but first check if it permitted. # - if [ -z "`hostname -s`" ]; then - hostname ${hostname} - echo "Setting hostname: `hostname`." + if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then + if [ `$SYSCTL_N security.jail.set_hostname_allowed` -eq 0 ]; then + return + fi + elif [ -n "`hostname -s`" ]; then + return fi + + hostname ${hostname} + echo "Setting hostname: `hostname`." } =20 load_rc_config $name --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --sDKAb4OeUBrWWL6P Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAR7BDForvXbEpPzQRAv6XAJ9W3Vgtn4+TqPulo1ckKWOL1DmMgACgmX5J GqzT4PSLV3bZcXc45XgREHw= =fPDi -----END PGP SIGNATURE----- --sDKAb4OeUBrWWL6P--