From owner-freebsd-rc@freebsd.org Sun Mar 20 22:04:57 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A785ACE77F; Sun, 20 Mar 2016 22:04:57 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33FBAE94; Sun, 20 Mar 2016 22:04:57 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad2.stack.nl (toad2.stack.nl [IPv6:2001:610:1108:5010::161]) by mx1.stack.nl (Postfix) with ESMTP id 2B753B805D; Sun, 20 Mar 2016 23:04:54 +0100 (CET) Received: by toad2.stack.nl (Postfix, from userid 1677) id 854AA892B9; Sun, 20 Mar 2016 23:04:54 +0100 (CET) Date: Sun, 20 Mar 2016 23:04:54 +0100 From: Jilles Tjoelker To: Tim Preston , freebsd-rc@freebsd.org Cc: freebsd-current@freebsd.org, adrian@freebsd.org Subject: Re: Possible problem with the ${name}_chdir variable behaviour in /etc/c.subr Message-ID: <20160320220454.GA78464@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2016 22:04:57 -0000 On Sun, Mar 20, 2016 at 05:51:30PM +0000, Tim Preston wrote: > I was having a problem making the audio/teamspeak3-server port start > fro the rc.d scripts on a -current box that I’ve just built. I > eventually traced this down to it not starting in the correct > directory. > Looking at the rc.d script I could see that it was attempting to chdir > to the correct directory by setting the teamspeak_chdir variable. So > it looked like this feature was misbehaving in some way. > To test this I put together an rc.d script for pwd that used > ${name}_chdir based on how the teamspeak rc.d script was setup. > Running this on a 10.3 box showed that it was changing to the > specified directory as expected, but on -current it was not. > I’ve taken a quick look at rc.subr on both boxes but I can’t > immediately see what’s breaking this, and I can’t see anything in the > setup or behaviour of the -current box that would point to it being > something that I’ve broken somehow there. > I was wondering if anyone else could reproduce this? The NAME_chdir variable prepends 'cd $NAME_chdir && ' to the command at a certain point. Prepending further commands like limits (as added by SVN r288291) will not work properly. The older $NAME_prepend feature is broken in the same way. The cd command is having the limits or similar applied to it while the real command is running without proper limits and current directory. The NAME_user and NAME_nice variables use sh -c to avoid this problem but it introduces double-quoting issues (i.e. using arguments containing certain special characters requires an additional unexpected level of quoting). Prepending cd at a later time would avoid the problem with limits and NAME_prepend and allow getting rid of sh -c, but would change the directory as root so permission problems with NAME_user would be detected later. -- Jilles Tjoelker From owner-freebsd-rc@freebsd.org Fri Mar 25 07:47:54 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1C3DADC816 for ; Fri, 25 Mar 2016 07:47:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9201A14B8 for ; Fri, 25 Mar 2016 07:47:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u2P7lsnd094126 for ; Fri, 25 Mar 2016 07:47:54 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-rc@FreeBSD.org Subject: [Bug 205671] etc/rc.d/pf: report "pf not running" if /dev/pf doesn't exist Date: Fri, 25 Mar 2016 07:47:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: xmj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-rc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2016 07:47:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205671 --- Comment #2 from Johannes Jost Meixner --- Created attachment 168602 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D168602&action= =3Dedit patch pf rc script The use case is not having `service pf status` throw error lines like this = one: xmj@mx12:~/repos/src-svnssh$ pfctl -s info pfctl: /dev/pf: No such file or directory and actually display that pf isn't loaded. --=20 You are receiving this mail because: You are the assignee for the bug.=