Skip to contentSkip to conversation

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

PATCH Applied Sergey Organov 3 participants 4 messages Feb 4, 2023 – Feb 14, 2023

lore
Share & tools
lore
#0 lore raw

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

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.

---
 package/openvpn/S60openvpn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/openvpn/S60openvpn +1 -1
index f097cf11ec..00156c80db 100644
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 #
 # Original version by Robert Leslie
 # <[email protected]>, edited by iwj and cs

base-commit: c7ea83dd2df315ba4f492a9ef6b24152ba4cc4f3

Signature · 6 lines
2.30.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Sergey, All,

On 2023-02-04 16:47 +0300, Sergey Organov spake thusly:

Quoted 8 lines

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.

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.

Quoted 23 lines
---
 package/openvpn/S60openvpn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/openvpn/S60openvpn +1 -1
index f097cf11ec..00156c80db 100644
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 #
 # Original version by Robert Leslie
 # <[email protected]>, edited by iwj and cs

base-commit: c7ea83dd2df315ba4f492a9ef6b24152ba4cc4f3

Signature · 6 lines
2.30.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 7 lines · Yann E. MORIN

Sergey, All,

On 2023-02-04 16:47 +0300, Sergey Organov spake thusly:

Quoted 4 lines

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

Quoted 6 lines
Quoted 4 lines

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

Applied to master, thanks.

Thank you in turn!

Quoted 13 lines

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)
Quoted 2 lines

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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Sergey Organov
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sergey" == Sergey Organov <[email protected]> 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.

Committed to 2022.11.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot