From patchwork Wed May 27 07:11:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1298668 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.138; helo=whitealder.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=ZyjBHmuS; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49X27Z29fwz9sSW for ; Wed, 27 May 2020 17:11:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 57D058160B; Wed, 27 May 2020 07:11:36 +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 mlmdh86tGc8A; Wed, 27 May 2020 07:11:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 500B7876DA; Wed, 27 May 2020 07:11:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id ACBDC1BF423 for ; Wed, 27 May 2020 07:11:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A63B686AFD for ; Wed, 27 May 2020 07:11:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pLRT-De81DFc for ; Wed, 27 May 2020 07:11:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4FA0D8579E for ; Wed, 27 May 2020 07:11:33 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id j198so1581529wmj.0 for ; Wed, 27 May 2020 00:11:33 -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:mime-version :content-transfer-encoding; bh=f2dPGar/oL6mHFK6134onTctmCe/n7ceJVuWRdRlt9g=; b=ZyjBHmuSK9kC9oPuq+BPlwslXmr8RXeygSBptUy1HpLQp4R02BgC0uGm+wrk16DvxY q3TvoYN5tuOyrtt0hPJKm7r0s0fR9igSNvOXv+02cmebJx9/Z3K8NkbY6xgWHmCa4zO+ 8hlUjn7B1658VSUzXxQG9Un36zHgvuf5HFQfD2iDOaL2DwF+jv9m/sl/DX1qnXYvOQ3l JG+uVXx2kOhO0NAWylaW/zgTYpZOBaYBqWOARSWpAa/c1h8i2adVQDU8lc5eIUMU+sHY 7IIRazPcqemfYBp0yjxy3oJ+qlpNnf9b+OSxvKkZMi8XsQ4/BCBi+IDHpkreG7Ar4pQC uFOQ== 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:mime-version :content-transfer-encoding; bh=f2dPGar/oL6mHFK6134onTctmCe/n7ceJVuWRdRlt9g=; b=L8OWY9AvnM+JpO8WsFETEcctoHKThnlmkPn/OKjbCcC8+QVvryt+VCCxO0tzN6czpx NME7UDFed9vRAJQp7V2+3N4DaRgfl9JiyghQMaz4hbfFfX7sZQYgyWjYLDYBOP7GsQoF FvoNNr7Iv0esZwWNnlJs1v3Wfec6IbWITYHZflBVRGyMhFw4psz20Zq/9z1G6tcoc5k1 REGwGsUtmJlwh6Ezzm9JQKrDOaiHFckTKBr+zrMJvWaQ5VM9Vcz7u+Wkwcb2uOf6nutN MZN+UpxbvvMSWhGGDjolfdh/1YdC6K4I6unU4Y3zmR6a6IwWIGpN8USOalYSEwZYAEVe 4NMw== X-Gm-Message-State: AOAM533EWUENDSnrpUepWzCmqX2fU+pClV7zTQrdSZQff921Q44pNXOV FAJl1DXnKyDkq6VYShoOQoVrwJB4 X-Google-Smtp-Source: ABdhPJzD1WVWfs/711BdLiwVCIG0q49jMXDPoq/E7l8lbFmAkBj4m7IAW02f2cwjAa3myjiOSCKB4g== X-Received: by 2002:a1c:9e8a:: with SMTP id h132mr2895974wme.32.1590563491154; Wed, 27 May 2020 00:11:31 -0700 (PDT) Received: from t450s.fritz.box (ip5b426f84.dynamic.kabel-deutschland.de. [91.66.111.132]) by smtp.gmail.com with ESMTPSA id n65sm1886865wmb.48.2020.05.27.00.11.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 00:11:30 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Wed, 27 May 2020 09:11:13 +0200 Message-Id: <20200527071113.15121-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] package/syrepo: fix SysV init script 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: Heiko Thiery , =?utf-8?q?Jan_Kundr=C3=A1t?= , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The current script (S51sysrepo-plugind) is not able to stop the daemon. Possible options to fix the problem: A) By adding the "-m -p $PIDFILE" option to start the pid file will be created but it will not contain the correct PID used by the daemon. This is obviously because the daemon forks. B) By not starting the daemon in background (sysrepo-plugind -d) and let do it by start-stop-daemon with "-b" option. But then the log messages of the daemon will not longer ends in the syslog but to stderr. C) Start the daemon without a pidfile and stop the daemon with the "-x" option. The only valid option is C to fix that. Signed-off-by: Heiko Thiery --- changes v1 -> v2: Add a proper commit message. --- package/sysrepo/S51sysrepo-plugind | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/sysrepo/S51sysrepo-plugind b/package/sysrepo/S51sysrepo-plugind index 74b68396bf..9e15da59f9 100644 --- a/package/sysrepo/S51sysrepo-plugind +++ b/package/sysrepo/S51sysrepo-plugind @@ -1,7 +1,6 @@ #!/bin/sh DAEMON="sysrepo-plugind" -PIDFILE="/var/run/$DAEMON.pid" SYSREPO_PLUGIND_ARGS="" @@ -23,7 +22,7 @@ start() { stop() { printf 'Stopping %s: ' "$DAEMON" - start-stop-daemon -K -q -p $PIDFILE + start-stop-daemon -K -q -x "/usr/bin/$DAEMON" status=$? if [ "$status" -eq 0 ]; then echo "OK"