On Tue, 2 Jul 2024 at 06:15, Michael Kelley <mhklinux@xxxxxxxxxxx> wrote: > > From: Anthony Nandaa <profnandaa@xxxxxxxxx> Sent: Monday, July 1, 2024 1:36 AM > > > > This patch updates the shebang in the lsvmbus tool to use python3 > > instead of python. The change is necessary because Python 2 has > > reached its end of life as of January 1, 2020, and is no longer > > maintained[1]. Many modern systems do not have python pointing to > > Python 2, and instead use python3. > > > > By explicitly using python3, we ensure compatibility with modern > > systems since Python 2 is no longer being shipped by default. > > > > This change also updates the file permissions to make the script > > executable, so that the script runs out of the box. > > Also, similar scripts within `tools/hv` have mode `755`: > > > > ``` > > -rwxr-xr-x 1 labuser labuser 930 Jun 28 16:15 hv_get_dhcp_info.sh > > -rwxr-xr-x 1 labuser labuser 622 Jun 28 16:15 hv_get_dns_info.sh > > -rwxr-xr-x 1 labuser labuser 1888 Jun 28 16:15 hv_set_ifconfig.sh > > ``` > > > > Before fix, this is what you get when you attempt to run `lsvmbus`: > > ``` > > /usr/bin/env: 'python': No such file or directory > > ``` > > > > A note about commit message style. The guidelines in > Documentation/process/submitting-patches.rst specifically say to > use imperative mood and avoid "This patch" (and by extension, > "This change"). For a patch that is fixing a problem, I usually > describe the problem first, and then start a new paragraph with > "Fix this problem by .....". So for your patch, I would suggest > something like: > > In many modern Linux distros, running "lsvmbus" returns the error: > > /usr/bin/env: 'python': No such file or directory > > because 'python' doesn't point anywhere. Now that python2 has > reached end of life as of January 1, 2020 and is no longer > maintained[1], these distros have python3 instead. Also, the script > isn't executable by default because the permissions are set to > mode 644. > > Fix this by updating the shebang in the lsvmbus to use python3 > instead of python. Also fix the permissions to be 755 so that it is > executable by default, which matches other similar scripts in tools/hv. > > Michael Thanks Michael for the guidance. This is well noted and I'm going to fix in my revision. Regards, Nandaa