mafredri / vyatta-wireguard-installer

Install, upgrade or remove WireGuard (WireGuard/wireguard-vyatta-ubnt) on Ubiquiti hardware
MIT License
150 stars 16 forks source link

Upgrade failed #5

Closed sslupsky closed 5 years ago

sslupsky commented 5 years ago

There seems to be an issue that is causing an upgrade to fail. I receive the following error during ./wireguard.sh upgrade

Upgrading WireGuard...
Checking latest release for e200...
Downloading wireguard-e200-0.0.20190702-1.deb...
Disabling wg0 wg1...
wg must be (wg0-wg999)

Value validation failed
Set failed

wg version 0.0.20180802-1.
EdgeOS 1.10.5
Two interfaces wg0 and wg1

This line: https://github.com/mafredri/vyatta-wireguard-installer/blob/5619a9078f27b83f9a55fb47440e6e96e6766014/wireguard.sh#L56

returns interfaces: wg0 wg1

This line: https://github.com/mafredri/vyatta-wireguard-installer/blob/5619a9078f27b83f9a55fb47440e6e96e6766014/wireguard.sh#L62

shows both interfaces in the output as follows: Disabling wg0 wg1...

The expected output should be:

Disabling wg0...
Disabling wg1...

so it appears to me that the list of interfaces has not been tokenized?

sslupsky commented 5 years ago

Closed?

sslupsky commented 5 years ago

Ah, I see the commit now. That looks like the correct way to tokenize the string.

mafredri commented 5 years ago

Thanks for reporting, I always confuse this since I hop between bash and zsh, and shellcheck discourages the unquoted variant (which would work with bash).

I pushed https://github.com/mafredri/vyatta-wireguard-installer/commit/0a7260d5c9ca450a2c64fac9d72bda1f1e9903fe which fixes the issue. You should be able to run self-update now 😄.

sslupsky commented 5 years ago

Thank you for this. I did the self-update and got the changes. Sweet :-)