From owner-freebsd-current@FreeBSD.ORG Thu Aug 14 08:25:04 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D95E037B401; Thu, 14 Aug 2003 08:25:04 -0700 (PDT) Received: from mail.westbend.net (ns1.westbend.net [216.47.253.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88A7E43FB1; Thu, 14 Aug 2003 08:25:01 -0700 (PDT) (envelope-from hetzels@westbend.net) Received: from Admin02 (admin02.westbend.net [216.47.253.19]) by mail.westbend.net (8.12.9/8.12.9) with SMTP id h7EFOnQM090918; Thu, 14 Aug 2003 10:24:50 -0500 (CDT) (envelope-from hetzels@westbend.net) Message-ID: <008901c36278$3d4a8f80$13fd2fd8@Admin02> From: "Scot W. Hetzel" To: "Mike Makonnen" , "Jens Rehsack" References: <3F26AA16.5030007@liwing.de> <20030729172122.GA5005@kokeb.ambesa.net><3F26BC7B.8070507@liwing.de> <20030801232918.GA37095@kokeb.ambesa.net><3F2D1800.5020006@liwing.de> <20030803230410.GA16947@kokeb.ambesa.net> Date: Thu, 14 Aug 2003 08:36:40 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=0.5 required=8.0 tests=REFERENCES,SPAM_PHRASE_00_01,USER_AGENT_OE version=2.43 cc: Clement Laforet cc: Robert Watson cc: FreeBSD-Current List Subject: Re: [PATCH] jail NG schript patch for mounting devfs and procfsautomatically X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 15:25:05 -0000 I just noticed a problem with periodic scripts inside a jail. I'm getting: Local system status: tee: /dev/stderr: Operation not supported Mail in local queue: tee: /dev/stderr: Operation not supported Mail in submit queue: tee: /dev/stderr: Operation not supported in the periodic daily, weekly, monthly and security reports. But if I mount the fdescfs on the jail, then these errors go away. So we need to add the following to the new jail script jail_start() { : eval jail_devfs=\"\$jail_${_jail}_devfs\" [ -z ${jail_devfs} ] && jail_devfs="NO": eval jail_fdescfs=\"\$jail_${_jail}_fdescfs\" [ -z ${jail_fdescfs} ] && jail_fdescfs="NO" : if checkyesno jail_devfs ; then mount -t devfs dev ${jail_devdir} if checkyesno jail_fdescfs ; then mount -t fdescfs fdesc ${jail_devdir}/fd fi : fi : } jail_stop() { : eval jail_devfs=\"\$jail_${_jail}_devfs\" [ -z ${jail_devfs} ] && jail_devfs="NO": eval jail_fdescfs=\"\$jail_${_jail}_fdescfs\" [ -z ${jail_fdescfs} ] && jail_fdescfs="NO" : if checkyesno jail_devfs ; then if [ -d ${jail_devdir} ] ; then if checkyesno jail_fdescfs; then umount -f ${jail_devdir}/fd >/dev/null 2>&1 fi umount -f ${jail_devdir} >/dev/null 2>&1 fi fi : } The only decsion we need to make is wheter to always mount the fdescfs when devfs is mounted on the jail, or have a variable to enable mounting of the fdescfs (jail_*_fdescfs). Scot