Jan Beulich writes ("[PATCH] scripts: don't rely on "stat -" support"):
> While commit b72682c602b8 ("scripts: Use stat to check lock claim")
> validly indicates that stat has gained support for the special "-"
> command line option in 2009, we should still try to avoid breaking being
> able to run on even older distros. As it has been determined, contary to
> the comment in the script using /dev/stdin (/proc/self/fd/$_lockfd) is
> fine here, as Linux specially treats these /proc inodes.
> 
> Suggested-by: Ian Jackson <[email protected]>
> Signed-off-by: Jan Beulich <[email protected]>

Thanks.

The only code change here is this:

> --- a/tools/hotplug/Linux/locking.sh
> +++ b/tools/hotplug/Linux/locking.sh
> @@ -45,18 +45,14 @@ claim_lock()
> -        if stat=$( stat -L -c '%D.%i' - $_lockfile 0<&$_lockfd 2>/dev/null )
> +        if stat=$( stat -L -c '%D.%i' /dev/stdin $_lockfile 0<&$_lockfd 
> 2>/dev/null )

Reviewed-by: Ian Jackson <[email protected]>

Has anyone executed this ?

Paul, can we have a release-ack ?

Thanks,
Ian.

Reply via email to