vpnserver_ynh icon indicating copy to clipboard operation
vpnserver_ynh copied to clipboard

Default `ip4range` user settings breaks the installation

Open kemenaran opened this issue 7 years ago • 0 comments

Steps to reproduce

  1. sudo yunohost app install https://github.com/YunoHost-Apps/openvpn_ynh
  2. When the script asks for the ip4range, press enter to use the default value (the empty string)
  3. Answer the other questions, and start the installation

Expected result

The installation completes successfully

Actual result

The installation fails. The error is:

# (… snip …)
+ check_tun_available
+ return 0
+ check_ip4ranges
Warning: _common.sh: line 47: $1: unbound variable
+ _255='(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)'
+ ip4regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)'
Warning:
+ rangeip4regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?'
+ regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?([[:space:]]+((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?)*'
++ ynh_exit_properly
# (… snip …)

This seems to be because the ip4range value is empty, and never gets passed to the check_ip4ranges function. And even if it does, an empty string causes this function to fail later.

kemenaran avatar Aug 12 '17 06:08 kemenaran