Comment 1 for bug 1928259

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I have this PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/nfs-utils-restart-1928259

With the following patch applied to all ubuntu releases:
--- a/debian/nfs-common.postinst
+++ b/debian/nfs-common.postinst
@@ -43,6 +43,10 @@ case "$1" in
        if [ -f /lib/init/rw/sendsigs.omit.d/statd ]; then
            mv /lib/init/rw/sendsigs.omit.d/statd /run/sendsigs.omit.d/statd
        fi
+
+ # always "start" nfs-utils.service, so package upgrades will restart it,
+ # see LP: #1928259
+ systemctl start nfs-utils.service > /dev/null || true
     ;;
 esac

It works for the use case we are trying to fix, and also for simpler nfs-v{2,3} cases. But it's not very clean I think...

I'm testing, and checking what happens (or should happen) if one has nfs-utils.service masked, for example.