mount-net hangs on shutdown without network
To reproduce: mount an NFS, disable network and shutdown.
Reason: umount -f may hang. We should use umount -l in case of shutdown, as per man page.
I don't have a perfect way to fix this. It is reasonable to let the command hang when it is invoked manually by the user. But this is undesirable in case of system shutdown.
I am now using this down script:
#!/bin/execlineb -P
if -nt { s6-maximumtime -k 3000 umount -aft nfs4,nfs -O _netdev }
umount -alt nfs4,nfs -O _netdev
But this is not ideal: first it does not distinguish the two cases (manual invocation vs shutdown), and second s6-maximumtime fails to kill the umount -f and outputs a warning (which I don't understand).
To distinguish the two cases I can think of adding a line to the rc.shutdown script, but then it will no longer be a neat call to s6-rc.