mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
rpcbind: make service socket activated
Instead of setting 'Restart=always' in the service file, we should make the service socket activated, just like what Fedora does. (From OE-Core rev: 176e91ef28800adb6295b29c455b2efb91a01876) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
[Unit]
|
||||
Description=RPC Bind
|
||||
After=network.target
|
||||
Wants=rpcbind.target
|
||||
Before=rpcbind.target
|
||||
Description=RPC Bind Service
|
||||
Requires=rpcbind.socket
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
|
||||
ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
|
||||
Restart=always
|
||||
SuccessExitStatus=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Also=rpcbind.socket
|
||||
|
||||
8
meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
Normal file
8
meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=RPCbind Server Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/var/run/rpcbind.sock
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
|
||||
file://init.d \
|
||||
${UCLIBCPATCHES} \
|
||||
file://rpcbind.conf \
|
||||
file://rpcbind.socket \
|
||||
file://rpcbind.service \
|
||||
"
|
||||
|
||||
@@ -34,8 +35,7 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
|
||||
INITSCRIPT_NAME = "rpcbind"
|
||||
INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
|
||||
|
||||
SYSTEMD_SERVICE_${PN} = "rpcbind.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket"
|
||||
|
||||
inherit useradd
|
||||
|
||||
@@ -56,6 +56,7 @@ do_install_append () {
|
||||
|
||||
install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
|
||||
Reference in New Issue
Block a user