fff-gateway: remove useless test

Submitted by Robert Langhammer on April 26, 2020, 7:16 p.m.

Details

Message ID 20200426191632.19788-1-rlanghammer@web.de
State New
Headers show

Commit Message

Robert Langhammer April 26, 2020, 7:16 p.m.
The parametertest of execute_subshell() will never fail. All calls are hardcoded! It can be removed.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
---
 src/packages/fff/fff-gateway/files/usr/sbin/configuregateway | 4 ----
 1 file changed, 4 deletions(-)

--
2.20.1

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway b/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
index 5230888..bef7af6 100755
--- a/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
+++ b/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
@@ -14,10 +14,6 @@ 
 # DO NOT RUN THIS IN CRONJOB!

 execute_subshell() {
-	if [ $# -ne 1 ]; then
-		echo "Usage:" "$0" "<function>"
-	fi
-
 	for script in /etc/gateway.d/*; do
 		(
 			# unset function to prevent executing parents shell function

Comments

Fabian Blaese June 18, 2020, 10:06 a.m.
Hmm. Fehlerbehandlung weg patchen ist irgendwie immer so eine Sache. Sollte man diese Funktion doch irgendwann noch mal brauchen, wenn man etwas neues entwickelt, dann könnte man da schon auf die Nase fallen.
Ich bin hier etwas unentschlossen. Was meinen die anderen?

Gruß
Fabian

On 26.04.20 21:16, Robert Langhammer wrote:
> The parametertest of execute_subshell() will never fail. All calls are hardcoded! It can be removed.
> 
> Signed-off-by: Robert Langhammer <rlanghammer@web.de>
> ---
>  src/packages/fff/fff-gateway/files/usr/sbin/configuregateway | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway b/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
> index 5230888..bef7af6 100755
> --- a/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
> +++ b/src/packages/fff/fff-gateway/files/usr/sbin/configuregateway
> @@ -14,10 +14,6 @@
>  # DO NOT RUN THIS IN CRONJOB!
> 
>  execute_subshell() {
> -	if [ $# -ne 1 ]; then
> -		echo "Usage:" "$0" "<function>"
> -	fi
> -
>  	for script in /etc/gateway.d/*; do
>  		(
>  			# unset function to prevent executing parents shell function
> --
> 2.20.1
>