From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QXx99-00075z-Lc for garchives@archives.gentoo.org; Sat, 18 Jun 2011 15:09:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45E8B1C038; Sat, 18 Jun 2011 15:09:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 16FA41C129 for ; Sat, 18 Jun 2011 15:09:03 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9E2941B4032 for ; Sat, 18 Jun 2011 15:09:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 05BA88003C for ; Sat, 18 Jun 2011 15:09:02 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <8947c00204e771a669433708de7aa740dca9d16c.williamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/sysctl.Linux.in X-VCS-Directories: init.d/ X-VCS-Committer: williamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 8947c00204e771a669433708de7aa740dca9d16c Date: Sat, 18 Jun 2011 15:09:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ce47b12ac2170987954a3a4aad219ea3 commit: 8947c00204e771a669433708de7aa740dca9d16c Author: Mike Frysinger gentoo org> AuthorDate: Sat Jun 18 03:13:14 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Jun 18 15:06:41 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D8947c002 sysctl: do not make unknown keys fatal If unknown keys are found, currently sysctl would add all of its valid settings, but then leave itself marked as "stopped". Since this is not really what we want, make unknown keys a non-fatal error. Reported-by: Christian Ruppert gentoo.org> Signed-off-by: Mike Frysinger gentoo.org> --- init.d/sysctl.Linux.in | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in index 83e7536..19b4942 100644 --- a/init.d/sysctl.Linux.in +++ b/init.d/sysctl.Linux.in @@ -10,16 +10,25 @@ depend() =20 start() { - local conf=3D retval=3D0 + local conf=3D retval=3D0 err errs + ebegin "Configuring kernel parameters" eindent + for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do if [ -r "$conf" ]; then vebegin "applying $conf" - sysctl -p "$conf" >/dev/null + if ! err=3D$(sysctl -q -p "$conf" 2>&1) ; then + errs=3D"${errs} ${err}" + sysctl -q -e -p "${conf}" + fi veend $? || retval=3D1 fi done + eoutdent - eend $retval "Some errors were encountered" + if [ ${retval} -eq 0 ] && [ -n "${errs}" ] ; then + ewarn "Unknown keys:${errs}" + fi + eend $retval "Some errors were encountered: ${errs}" }