Blame SOURCES/nfs-utils-2.5.4-rpcidmapd-return.patch

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