[RFC,06/15] network scripts: remove check for AUTOCONNECT

Message ID 20230523172314.7826-7-jonatan.schlag@ipfire.org
State Changes Requested
Headers
Series [RFC,01/15] Remove ipsec interface creation from network startup |

Commit Message

Jonatan Schlag May 23, 2023, 5:23 p.m. UTC
  This setting is also old (2007) and cannot be set via the webinterface
anymore. So why checking for something, which can only be true.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
 src/initscripts/system/network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer May 24, 2023, 9 a.m. UTC | #1
True, we no longer support dial-on-demand.

> On 23 May 2023, at 18:23, Jonatan Schlag <jonatan.schlag@ipfire.org> wrote:
> 
> This setting is also old (2007) and cannot be set via the webinterface
> anymore. So why checking for something, which can only be true.
> 
> Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
> ---
> src/initscripts/system/network | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/initscripts/system/network b/src/initscripts/system/network
> index 146b3fda8..6a47456f3 100644
> --- a/src/initscripts/system/network
> +++ b/src/initscripts/system/network
> @@ -63,7 +63,7 @@ case "${DO}" in
> if [ "$red" == "1" ]; then
> # Remove possible leftover files
> rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
> - [ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start
> + /etc/rc.d/init.d/networking/red start
> fi
> 
> /etc/rc.d/init.d/static-routes start
> -- 
> 2.30.2
>
  

Patch

diff --git a/src/initscripts/system/network b/src/initscripts/system/network
index 146b3fda8..6a47456f3 100644
--- a/src/initscripts/system/network
+++ b/src/initscripts/system/network
@@ -63,7 +63,7 @@  case "${DO}" in
 		if [ "$red" == "1" ]; then
 			# Remove possible leftover files
 			rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
-			[ "$AUTOCONNECT" == "off" ] || /etc/rc.d/init.d/networking/red start
+			/etc/rc.d/init.d/networking/red start
 		fi
 
 		/etc/rc.d/init.d/static-routes start