NetworkManager-ssh icon indicating copy to clipboard operation
NetworkManager-ssh copied to clipboard

fix bashism in nm_ssh_get_free_device

Open jcmvbkbc opened this issue 2 years ago • 3 comments

On systems with default shell being anything other than bash the redirection '>& /dev/null' may cause shell error, resulting in nm_ssh_get_free_device always returning 0. When tun0 or tap0 is busy this results in failure to establish the tunnel.

Replace bash-specific redirection form '>& /dev/null' with more generic '> /dev/null 2>&1'.

Signed-off-by: Max Filippov [email protected]

jcmvbkbc avatar Aug 22 '21 01:08 jcmvbkbc

Looks good, I'm tempted to just merge it. Have you got a change to test it?

danfruehauf avatar Sep 06 '21 05:09 danfruehauf

Yes, I'm running nm-ssh-service with this change for a few weeks now on a machine with sh symlinked to dash and tap0 used for qemu network.

jcmvbkbc avatar Sep 06 '21 07:09 jcmvbkbc

Ping. I wonder if there's anything that prevents merging this simple fix?

jcmvbkbc avatar Aug 31 '22 09:08 jcmvbkbc

Any hope to have this fix merged?

petterreinholdtsen avatar Dec 25 '22 09:12 petterreinholdtsen