diff mbox series

package/openvpn: get rid of -e in S60openvpn shebang

Message ID 20230204134709.4160596-1-sorganov@gmail.com
State Accepted
Headers show
Series package/openvpn: get rid of -e in S60openvpn shebang | expand

Commit Message

Sergey Organov Feb. 4, 2023, 1:47 p.m. UTC
The -e switch makes the script terminate on error from
start-stop-daemon, rendering unreachable the code that checks the exit
status.

There is no need in the -e switch in the first place either, as the
script takes care of errors handling.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
---
 package/openvpn/S60openvpn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: c7ea83dd2df315ba4f492a9ef6b24152ba4cc4f3

Comments

Yann E. MORIN Feb. 4, 2023, 2:39 p.m. UTC | #1
Sergey, All,

On 2023-02-04 16:47 +0300, Sergey Organov spake thusly:
> The -e switch makes the script terminate on error from
> start-stop-daemon, rendering unreachable the code that checks the exit
> status.
> 
> There is no need in the -e switch in the first place either, as the
> script takes care of errors handling.
> 
> Signed-off-by: Sergey Organov <sorganov@gmail.com>

Applied to master, thanks.

However, this script has a lot of coding style issues:

    $ ./utils/check-package 
    package/openvpn/S60openvpn:14: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    package/openvpn/S60openvpn:15: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    package/openvpn/S60openvpn:16: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    package/openvpn/S60openvpn:17: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    package/openvpn/S60openvpn:18: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    package/openvpn/S60openvpn:21: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
    [...]
    package/openvpn/S60openvpn:0: DAEMON variable not defined (http://nightly.buildroot.org/#adding-packages-start-script)

Could you look into bringing this old script up to today's standards,
please?

Regards,
Yann E. MORIN.

> ---
>  package/openvpn/S60openvpn | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn
> index f097cf11ec..00156c80db 100644
> --- a/package/openvpn/S60openvpn
> +++ b/package/openvpn/S60openvpn
> @@ -1,4 +1,4 @@
> -#!/bin/sh -e
> +#!/bin/sh
>  #
>  # Original version by Robert Leslie
>  # <rob@mars.org>, edited by iwj and cs
> 
> base-commit: c7ea83dd2df315ba4f492a9ef6b24152ba4cc4f3
> -- 
> 2.30.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Sergey Organov Feb. 4, 2023, 8:52 p.m. UTC | #2
"Yann E. MORIN" <yann.morin.1998@free.fr> writes:

> Sergey, All,
>
> On 2023-02-04 16:47 +0300, Sergey Organov spake thusly:
>> The -e switch makes the script terminate on error from
>> start-stop-daemon, rendering unreachable the code that checks the exit
>> status.
>> 
>> There is no need in the -e switch in the first place either, as the
>> script takes care of errors handling.
>> 
>> Signed-off-by: Sergey Organov <sorganov@gmail.com>
>
> Applied to master, thanks.

Thank you in turn!

>
> However, this script has a lot of coding style issues:
>
>     $ ./utils/check-package 
>     package/openvpn/S60openvpn:14: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     package/openvpn/S60openvpn:15: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     package/openvpn/S60openvpn:16: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     package/openvpn/S60openvpn:17: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     package/openvpn/S60openvpn:18: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     package/openvpn/S60openvpn:21: should be indented with tabs (http://nightly.buildroot.org/#adding-packages-start-script)
>     [...]
>     package/openvpn/S60openvpn:0: DAEMON variable not defined (http://nightly.buildroot.org/#adding-packages-start-script)
>
> Could you look into bringing this old script up to today's standards,
> please?

Sorry, probably not me, as I'm currently using rather old buildroot
version, and it'd be problematic for me to check such changes against
the mainline.

Best regards,
-- Sergey Organov
Peter Korsgaard Feb. 14, 2023, 4:17 p.m. UTC | #3
>>>>> "Sergey" == Sergey Organov <sorganov@gmail.com> writes:

 > The -e switch makes the script terminate on error from
 > start-stop-daemon, rendering unreachable the code that checks the exit
 > status.

 > There is no need in the -e switch in the first place either, as the
 > script takes care of errors handling.

 > Signed-off-by: Sergey Organov <sorganov@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn
index f097cf11ec..00156c80db 100644
--- a/package/openvpn/S60openvpn
+++ b/package/openvpn/S60openvpn
@@ -1,4 +1,4 @@ 
-#!/bin/sh -e
+#!/bin/sh
 #
 # Original version by Robert Leslie
 # <rob@mars.org>, edited by iwj and cs