From patchwork Sun Jun 15 11:38:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagaert Johan X-Patchwork-Id: 359829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id D372014009B for ; Sun, 15 Jun 2014 21:38:37 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 43AF18B1D0; Sun, 15 Jun 2014 11:38:36 +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 iennNHASyiRi; Sun, 15 Jun 2014 11:38:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6138B8B1B8; Sun, 15 Jun 2014 11:38:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 99FC51BFA58 for ; Sun, 15 Jun 2014 11:38:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 965A98B615 for ; Sun, 15 Jun 2014 11:38:33 +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 h0OkjFzLWFup for ; Sun, 15 Jun 2014 11:38:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by whitealder.osuosl.org (Postfix) with ESMTP id A5C918B628 for ; Sun, 15 Jun 2014 11:38:31 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlMGAEqEnVNR9ayr/2dsb2JhbABagw1Sw3CBAhd1hGAjT0s3iEYBzweOdh2ELQSaQ4FDkhWDQjs Received: from 171.172-245-81.adsl-dyn.isp.belgacom.be (HELO debian605.apex) ([81.245.172.171]) by relay.skynet.be with ESMTP; 15 Jun 2014 13:38:29 +0200 From: Sagaert Johan To: buildroot@busybox.net Date: Sun, 15 Jun 2014 13:38:20 +0200 Message-Id: <1402832300-17147-1-git-send-email-sagaert.johan@skynet.be> X-Mailer: git-send-email 2.0.0 Cc: Sagaert Johan Subject: [Buildroot] [PATCH 1/1] rpcbind : add startup script X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net rpcbind must be started at boot time. Without this any nfs mount will fail. Signed-off-by: Sagaert Johan --- package/rpcbind/S30rpcbind | 38 ++++++++++++++++++++++++++++++++++++++ package/rpcbind/rpcbind.mk | 8 ++++++++ 2 files changed, 46 insertions(+) create mode 100644 package/rpcbind/S30rpcbind diff --git a/package/rpcbind/S30rpcbind b/package/rpcbind/S30rpcbind new file mode 100644 index 0000000..85ebd6f --- /dev/null +++ b/package/rpcbind/S30rpcbind @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts rpcbind. +# + +start() { + echo -n "Starting rpcbind: " + umask 077 + start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/bin/rpcbind + echo "OK" +} +stop() { + echo -n "Stopping rpcbind daemon: " + start-stop-daemon -K -q -p /var/run/rpcbind.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/rpcbind/rpcbind.mk b/package/rpcbind/rpcbind.mk index 19bdace..6a946f9 100644 --- a/package/rpcbind/rpcbind.mk +++ b/package/rpcbind/rpcbind.mk @@ -15,4 +15,12 @@ RPCBIND_CONF_ENV += \ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/tirpc/" RPCBIND_DEPENDENCIES += libtirpc +define RPCBIND_INSTALL_STARTUP_SCRIPT + [ -f $(TARGET_DIR)/etc/init.d/S30rpcbind ] || \ + $(INSTALL) -m 0755 -D package/rpcbind/S30rpcbind \ + $(TARGET_DIR)/etc/init.d/S30rpcbind +endef + +RPCBIND_POST_INSTALL_TARGET_HOOKS += RPCBIND_INSTALL_STARTUP_SCRIPT + $(eval $(autotools-package))