diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-09-17 19:50:17 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:51:06 +0100 |
commit | d6c712d1b127d018c829b0b006fd94749916fb7d (patch) | |
tree | adadcde56e0178d83bca1a25ade24b921d670773 /pkg/vpn/launcher_linux.go | |
parent | 9413b50cba3d8b4c9a8b6474729483b775aa5619 (diff) |
[ui] track failed state
Diffstat (limited to 'pkg/vpn/launcher_linux.go')
-rw-r--r-- | pkg/vpn/launcher_linux.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go index 3e872cd..52c87f7 100644 --- a/pkg/vpn/launcher_linux.go +++ b/pkg/vpn/launcher_linux.go @@ -39,10 +39,11 @@ var bitmaskRootPaths = []string{ type launcher struct { openvpnCh chan []string + failed bool } func newLauncher() (*launcher, error) { - l := launcher{make(chan []string, 1)} + l := launcher{make(chan []string, 1), false} go l.openvpnRunner() return &l, nil } @@ -139,7 +140,7 @@ func getPolkitPath() string { // now we get weird "/usr/libexec/policykit-1-pantheon/pantheon-agent-polkit", "/usr/lib/polkit-1-dde/dde-polkit-agent", - // do you know some we"re still missing? :) + // do you know some we"re still missing? please send a merge request :) } for _, polkit := range polkitPaths { @@ -191,6 +192,8 @@ func (l *launcher) openvpnRunner(arg ...string) { err := runBitmaskRoot(arg...) if err != nil { log.Printf("An error ocurred running openvpn: %v", err) + l.openvpnCh <- nil + l.failed = true } } } |