Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit bc770fb

Browse files
author
icymind
committed
split changerouteto command
1 parent 15c87cc commit bc770fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/vrouter-local.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class VRouter {
149149
}
150150
const cmd1 = `/sbin/route change default ${ip}`
151151
const cmd2 = `/usr/sbin/networksetup -setdnsservers "${info[0]}" "${ip}"`
152-
// https://askubuntu.com/questions/634620/when-using-and-sudo-on-the-first-command-is-the-second-command-run-as-sudo-t
153-
return this.sudoExec(`/bin/bash -c '${cmd1} && ${cmd2}'`)
152+
await this.sudoExec(cmd1)
153+
await this.sudoExec(cmd2)
154154
}
155155
async getActiveAdapter () {
156156
let cmd = String.raw`cat <<EOF | scutil

0 commit comments

Comments
 (0)