Commit 56141c12 authored by Sagaert Johan's avatar Sagaert Johan Committed by Peter Korsgaard
Browse files

rpcbind : add startup script



rpcbind must be started at boot time.
Without this any nfs mount will fail.

Signed-off-by: default avatarSagaert Johan <sagaert.johan@skynet.be>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 4414f7f1
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
#!/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 $?
+6 −0
Original line number Diff line number Diff line
@@ -16,4 +16,10 @@ RPCBIND_CONF_ENV += \
RPCBIND_DEPENDENCIES += libtirpc
RPCBIND_CONF_OPT += --with-rpcuser=root

define RPCBIND_INSTALL_INIT_SYSV
	[ -f $(TARGET_DIR)/etc/init.d/S30rpcbind ] || \
		$(INSTALL) -m 0755 -D package/rpcbind/S30rpcbind \
			$(TARGET_DIR)/etc/init.d/S30rpcbind
endef

$(eval $(autotools-package))