diff --git a/packages/network/rpcbind/init.d/22_rpcbind b/packages/network/rpcbind/init.d/22_rpcbind deleted file mode 100644 index 569f6cfbb6..0000000000 --- a/packages/network/rpcbind/init.d/22_rpcbind +++ /dev/null @@ -1,26 +0,0 @@ -################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -# start rpcbind daemon -# -# runlevels: openelec, textmode - -progress "start rpcbind daemon" - rpcbind > /dev/null 2>&1 & \ No newline at end of file diff --git a/packages/network/rpcbind/package.mk b/packages/network/rpcbind/package.mk index 09c71e4673..a0b2cf5dba 100644 --- a/packages/network/rpcbind/package.mk +++ b/packages/network/rpcbind/package.mk @@ -39,3 +39,7 @@ PKG_CONFIGURE_OPTS_TARGET="--enable-warmstarts \ --disable-libwrap \ --with-statedir=/tmp \ --with-rpcuser=root" + +post_install() { + enable_service rpcbind.service +} diff --git a/packages/network/rpcbind/system.d/rpcbind.service b/packages/network/rpcbind/system.d/rpcbind.service new file mode 100644 index 0000000000..842b39af81 --- /dev/null +++ b/packages/network/rpcbind/system.d/rpcbind.service @@ -0,0 +1,14 @@ +[Unit] +Description=RPC bind service +Requires=rpcbind.socket +After=syslog.target network.target + +[Service] +Type=forking +# EnvironmentFile=/etc/sysconfig/rpcbind +ExecStart=/usr/bin/rpcbind -w ${RPCBIND_ARGS} + +[Install] +WantedBy=multi-user.target +Also=rpcbind.socket + diff --git a/packages/network/rpcbind/system.d/rpcbind.socket b/packages/network/rpcbind/system.d/rpcbind.socket new file mode 100644 index 0000000000..714370dc79 --- /dev/null +++ b/packages/network/rpcbind/system.d/rpcbind.socket @@ -0,0 +1,9 @@ +[Unit] +Description=RPCbind Server Activation Socket + +[Socket] +ListenStream=/var/run/rpcbind.sock + +[Install] +WantedBy=sockets.target +