Skip to content

Conversation

Adityashandilya555
Copy link
Contributor

@Adityashandilya555 Adityashandilya555 commented Oct 5, 2025

When user selects 'n' to disable OpenVPN during auto-install, the script was setting VPN_DOMAIN to "example.com" instead of an empty string. This caused the OpenVPN container to still start and fail on systems without /dev/net/tun device.

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #490

Please open a new issue if there isn't an existing issue yet.

Description of Changes

The existing logic in init_command.sh already handles this case by exiting when VPN_DOMAIN is empty. This change ensures the variable is properly set to empty when OpenVPN is disabled.

Screenshot

Screenshot 2025-10-05 at 9 04 38 AM

Please include any relevant screenshots.

Adityashandilya555 and others added 2 commits October 5, 2025 08:49


When user selects 'n' to disable OpenVPN during auto-install,
the script was setting VPN_DOMAIN to "example.com" instead of
an empty string. This caused the OpenVPN container to still
start and fail on systems without /dev/net/tun device.

The existing logic in init_command.sh already handles this case
by exiting when VPN_DOMAIN is empty. This change ensures the
variable is properly set to empty when OpenVPN is disabled.

Fixes openwisp#490
@Adityashandilya555 Adityashandilya555 force-pushed the issues/490-openvpn-disable-fix branch from 4f3f1eb to 244e196 Compare October 6, 2025 15:25
…penwisp#490

Replace bash 4.0+ specific syntax with explicit case checking to ensure
compatibility with older bash versions. The parameter expansion syntax
is not supported in bash 3.x, causing uppercase 'N' option to fail.

Fixes case sensitivity issue where prompt shows 'N' but only lowercase
'n' was accepted on systems with bash versions prior to 4.0.
@nemesifier nemesifier changed the title [auto-install] Fix OpenVPN container starting when disabled #490 [fix] Auto-install script: fixed disabling OpenVPN #490 Oct 6, 2025
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to resolve the issue, see #490 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] If I select ‘n’ in the install script for OpenVPN, the OpenVPN container is still started.

2 participants