From owner-freebsd-stable@FreeBSD.ORG Wed Feb 27 21:40:16 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5285FFD9 for ; Wed, 27 Feb 2013 21:40:16 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 20D4C1B5 for ; Wed, 27 Feb 2013 21:40:16 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id c10so1244471ieb.31 for ; Wed, 27 Feb 2013 13:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Xc5nMElVyC6YEe6BMP6Alntzo9fbyroeF1eW0louMuY=; b=mckYBzMfaAjP8j7aX/wTidfbE63H7lrVcSmpjX8VsxDqTD1i+lpucKqQSWmpWQ12qz O2WeATkMkwxP7gRXtvdJl05JrxoDyh+j+O51ECfvTXTTpzr0Gm4TcWE+kqfx9KB6gXj5 EFyM+IbGfT7MsK6xn2Y6qkWv2kd9cszDMgGoKHw+pcimIkYsbsgHawt3WvtjUbyyAwo0 IWtaodC05afJtj4/z4F6yzvLdt8oogJOSSdn2Jr1+7rAgCQ/z3S1xpXa+IwGWph0B/xU Wj+wOfWQfPFZwtYV2gve1mHEAuTpsV5qMrRbiZcrA7twlftz5afq9pgCsLmhMYLvJ1fy EXbw== X-Received: by 10.42.92.72 with SMTP id s8mr1704299icm.0.1362001215866; Wed, 27 Feb 2013 13:40:15 -0800 (PST) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.64.63.12 with HTTP; Wed, 27 Feb 2013 13:39:45 -0800 (PST) In-Reply-To: References: From: Chris Rees Date: Wed, 27 Feb 2013 21:39:45 +0000 X-Google-Sender-Auth: oXcQjtqt58xm6fln5SdMrH_E6zU Message-ID: Subject: Re: rc.d/sysctl fails to parse sysctl.conf To: Andreas Nilsson Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Stable Mailing List X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 21:40:16 -0000 On 27 February 2013 21:19, Andreas Nilsson wrote: > Hello, > > I tried to get my sound working, and long story short: rc.d/sysctl parses > sysctl.conf wrongly if there are sysctls of the form > > mib=val1=val2 > > which is what you need for sound. For reference I needed/wanted > > dev.hdaa.4.nid25_config=as=1,seq=15 > dev.hdaa.4.nid31_config=as=1 > > I believe the following patch would address the incorrect parsing: > > --- /etc/rc.d/sysctl.old 2013-02-27 22:00:00.000000000 +0100 > +++ /etc/rc.d/sysctl 2013-02-27 22:05:24.000000000 +0100 > @@ -26,7 +26,7 @@ > \#*|'') > ;; > *) > - mib=${var%=*} > + mib=${var%%=*} > val=${var#*=} > > if current_value=`${SYSCTL} -n ${mib} > 2>/dev/null`; then I think that this is the right thing to do here. Chris