Control: tags -1 patch

Pierre,

Thanks.

On Sat, Mar 09, 2019 at 06:40:01PM +0000, Pierre Ynard wrote:
> Are you sure this is the issue? /etc/network/if-up.d/mountnfs already
> contains, and I think already contained at the time, the following
> snippet to detect systemd, that you added yourself in #746587:
> 
> > # Skip the mountnfs hook when being triggered by the networking SysV init
> > # script and instead use the systemd built-in mechanisms to mount remote
> > # file systems.
> > # This avoids a deadlock caused by the rpcbind SysV init script depending
> > # on $network and the $network LSB facility being provided by the networking
> > # SysV init script.
> > if [ -d /run/systemd/system ]; then
> >                 systemctl list-jobs | grep -q network.target && exit 0
> > fi
> 
> Isn't that check adequate already? How should it be modified if not?

I don't know much about systemd, but I suppose this check could fail to skip
the script if network.target is not in the job list. I have no idea when that
might occur.

But, after so much time having lapsed, it probably makes sense to just exit the
hook if systemd is running at all.

Mark

commit 9ba383edb0ca4308b367108dcf7b5e61b71eec51
Author: Mark Hindley <m...@hindley.org.uk>
Date:   Mon Feb 17 11:23:09 2025 +0000

    if-up.d/mountnfs: completely noop if systemd is running.
    
    Closes: #782142

diff --git a/debian/src/initscripts/etc/network/if-up.d/mountnfs 
b/debian/src/initscripts/etc/network/if-up.d/mountnfs
index 9b1f47f2..5cde3246 100644
--- a/debian/src/initscripts/etc/network/if-up.d/mountnfs
+++ b/debian/src/initscripts/etc/network/if-up.d/mountnfs
@@ -7,14 +7,9 @@
 #                    Also mounts SMB filesystems now, so the name of
 #                    this script is getting increasingly inaccurate.
 
-# Skip the mountnfs hook when being triggered by the networking SysV init
-# script and instead use the systemd built-in mechanisms to mount remote
-# file systems.
-# This avoids a deadlock caused by the rpcbind SysV init script depending
-# on $network and the $network LSB facility being provided by the networking
-# SysV init script.
+# Skip hook if system is running systemd.
 if [ -d /run/systemd/system ]; then
-       systemctl list-jobs | grep -q network.target && exit 0
+       exit 0
 fi
 
 PATH=/sbin:/bin

Reply via email to