From patchwork Sun Mar 29 23:49:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1263577 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=RJqVrQs3; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48rC4S18tFz9sR4 for ; Mon, 30 Mar 2020 10:49:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6489A87EBB; Sun, 29 Mar 2020 23:49:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pg2meSIjAth7; Sun, 29 Mar 2020 23:49:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 634B887E6F; Sun, 29 Mar 2020 23:49:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 997691BF475 for ; Sun, 29 Mar 2020 23:49:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9669386FD1 for ; Sun, 29 Mar 2020 23:49:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3gw9QuoRSLl3 for ; Sun, 29 Mar 2020 23:49:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5AF7686EAC for ; Sun, 29 Mar 2020 23:49:37 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id t17so13672519qtn.12 for ; Sun, 29 Mar 2020 16:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ijbaoLsmlnU1ajnkVWC66P5mmyVc4imWc2fbclDqoJI=; b=RJqVrQs34pA4rJAlNRIv6HitTwNm3g3BsLwW8HBQIcvVwST8Jew81WYFaTza3Z1W/b 6uxhxJa+cD5d0QQfZn9+tWGa1a/4rTufcbFTfrhp5mLx1gyStUuJQNYvjTpuYyS3+AI5 kpfOuHs8iNlHD77zNcAO0d6cCPKEWfUgaWnUCNujUyJUDtMsTYVqY0PNcTdmkHrU/JLp a279NrvbumQYHJxjbhYj0NG91skP8DJ5qnkZm3Bsi/eNx5dJSyuPS3MHq17CkMb/94W0 P8CINMzAGZ2ceyU7RDY8TP5Uo1cFwnf3PFiiFyuPAF+PMhC+sCX00YJUpDpeEhnzI3k/ Y7oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ijbaoLsmlnU1ajnkVWC66P5mmyVc4imWc2fbclDqoJI=; b=qefvMpy06XZdLrzgsQSfDmdLKm39tmfFVfPHueD8F4Hl7bXP8B9Q+oWRac7rX1eQHN 1ZneH//+aIwUMa88D4O0W6EqhlYrW4q3sr5gDT4VxzKqf2ni1YLskqk0keEA4+/AF9mc 8cf8x4d9pYw/cRnqH6RRg7YTsHj8VV9p58DVy2uDBp0adtBbe18bQ1KbRa218xDZzNAh LvnOnltrGCSxekjN8PJm9EoaBPZWgJWkZ4545+WdKHJ9q2KUmKj3THR3L3146AYwOFhz t/6pvZTHIcLZDe0X4DSAvX0Dju522JxUnaXErNa1H59I5JZts+h0OnmH3hYQ1UilQ9f1 KMng== X-Gm-Message-State: ANhLgQ1B4fD5Tfhix7m7QNME5C2Ud8W4Z5IoEKdZw9F7TskVBQ+8c7Vg ATQms10euArbUk4HBWZe+5MC1pOm X-Google-Smtp-Source: ADFU+vvqZqSsfaUmAQuChvU/coumWYwLyPdhfYlYUsJQV6WNepAbuQdsqc+IYlsSN5aYTheYn+UzBg== X-Received: by 2002:aed:3383:: with SMTP id v3mr9595168qtd.177.1585525776075; Sun, 29 Mar 2020 16:49:36 -0700 (PDT) Received: from casantos.remote.csb.com (201.22.223.113.dynamic.adsl.gvt.net.br. [201.22.223.113]) by smtp.gmail.com with ESMTPSA id l7sm8843689qkb.47.2020.03.29.16.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Mar 2020 16:49:35 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 29 Mar 2020 20:49:23 -0300 Message-Id: <20200329234924.14505-3-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200329234924.14505-1-unixmania@gmail.com> References: <20200329234924.14505-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH 2/3] package/procps-ng: add busybox-related comments to S02sysctl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Explain the busybox peculiarities and how the script works with both versions of the sysctl utility. Signed-off-by: Carlos Santos --- package/procps-ng/S02sysctl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/package/procps-ng/S02sysctl b/package/procps-ng/S02sysctl index 3a58578de4..fed64e91a6 100644 --- a/package/procps-ng/S02sysctl +++ b/package/procps-ng/S02sysctl @@ -1,4 +1,17 @@ #!/bin/sh +# +# This script is used by busybox and procps-ng. +# +# With procps-ng, the "--system" option of sysctl also enables "--ignore", so +# errors are not reported via syslog. Use the run_logger function to mimic the +# --system behavior, still reporting errors via syslog. Users not interested +# on error reports can add "-e" to SYSCTL_ARGS. +# +# busybox does not have a "--system" option neither reports errors via syslog, +# so the scripting provides a consistent behavior between the implementations. +# Testing the busybox sysctl exit code is fruitless, as at the moment, since +# its exit status is zero even if errors happen. Hopefully this will be fixed +# in a future busybox version. PROGRAM="sysctl" @@ -12,12 +25,6 @@ SYSCTL_ARGS="" # symlinks to it. No attempt is made to prevent this. SYSCTL_SOURCES="/etc/sysctl.d/ /usr/local/lib/sysctl.d/ /usr/lib/sysctl.d/ /lib/sysctl.d/ /etc/sysctl.conf" -# The "--system" option activates "--ignore", which is bad because invalid -# variable settings in the configuration files will not be reported on the -# system log. Use some scripting to mimic the --system behavior but still -# reporting errors. Users not interested on error report can put "-e" in -# SYSCTL_ARGS. -# # The file redirections do the following: # # - stdout is redirected to syslog with facility.level "kern.info"