You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nfs-utils/SOURCES/nfs-utils-2.5.4-rpcidmapd-r...

41 lines
1.3 KiB

commit 9abd3b4b57155dfdfd6895e6086ef550ee56fc49
Author: Wenchao Hao <haowenchao@huawei.com>
Date: Tue Feb 22 16:06:51 2022 -0500
idmapd: Fix error status when nfs-idmapd exits
nfs-idmapd.service would report following error when stopped:
Starting NFSv4 ID-name mapping service...
rpc.idmapd[1198]: Setting log level to 0
Started NFSv4 ID-name mapping service.
rpc.idmapd[1198]: exiting on signal 15
Stopping NFSv4 ID-name mapping service...
nfs-idmapd.service: Main process exited, code=exited, status=1/FAILURE
nfs-idmapd.service: Failed with result 'exit-code'.
Stopped NFSv4 ID-name mapping service.
commit 93e8f092(idmapd: Add graceful exit and resource cleanup)
redirected SIGTERM, so when executing "systemctl stop nfs-idmapd", the
main() of idmapd would running to tail to return, while it returned 1
which considered as error by systemd.
So here just return 0 in main().
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index e2c160e8..e79c124d 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -474,7 +474,7 @@ main(int argc, char **argv)
event_free(svrdirev);
event_base_free(evbase);
- return 1;
+ return 0;
}
static void