|
38 | 38 | # Install NetBird service |
39 | 39 | if $enable { |
40 | 40 | $_checksum = lookup('common::network::netbird::checksums') |
41 | | - $_arch = profile::arch() |
42 | 41 |
|
43 | | - if $_os_name == 'TurrisOS' { |
44 | | - # NOTE: only tested on TurrisOS which has only armv6 packages |
45 | | - # even though TurrisOS comes with armv7 |
46 | | - if $_arch == 'armv7' { |
47 | | - $_arch = 'armv6' |
48 | | - } |
| 42 | + # NOTE: There are few TurrisOS routers which run on armv7l architecture. |
| 43 | + # However, netbird officially don't release armv7, but armv6 binaries. |
| 44 | + # Coincidentally, we tested the armv6 netbird binaries run perfectly fine. |
| 45 | + # Hence, we're using that in this case. |
| 46 | + $_arch = profile::arch() == 'armv7' ? { |
| 47 | + true => 'armv6', |
| 48 | + default => profile::arch(), |
| 49 | + } |
49 | 50 |
|
50 | | - exec { 'update_package_repo': |
51 | | - command => 'opkg update; opkg install kmod-tun', |
52 | | - path => '/usr/bin:/usr/sbin:/bin:/sbin', |
53 | | - unless => 'opkg list-installed | grep kmod-tun >/dev/null', |
54 | | - noop => $noop_value, |
| 51 | + if $_os_name == 'TurrisOS' { |
| 52 | + package { 'kmod-tun': |
| 53 | + ensure => ensure_present($enable), |
| 54 | + noop => $noop_value, |
55 | 55 | } |
56 | | - |
57 | | - # Uncomment the following piece of code when |
58 | | - # https://github.com/OpenVoxProject/openvox/pull/221 is merged |
59 | | - # and we've migrated from Puppet to OpenVox. |
60 | | - # package { 'kmod-tun': |
61 | | - # ensure => ensure_present($enable), |
62 | | - # provider => 'opkg', |
63 | | - # noop => $noop_value, |
64 | | - # require => Exec['update_package_repo'], |
65 | | - # } |
66 | 56 | } |
67 | 57 |
|
68 | 58 | # Download and extract NetBird binary from GitHub releases |
|
0 commit comments