Skip to content

Commit

Permalink
Merge pull request #1210 from jasonlyc/bug_fix
Browse files Browse the repository at this point in the history
do not stop pppd unless af is not specified in PPPoEInterfacePlugin.f…
  • Loading branch information
MelvinTo authored Feb 18, 2024
2 parents 83844a2 + b50d2d8 commit ece4722
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/interface/pppoe_intf_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ class PPPoEInterfacePlugin extends InterfaceBasePlugin {
await exec(`sudo cp ${r.getFireRouterHome()}/scripts/[email protected] /etc/systemd/system/`);
}

async flushIP() {
await exec(`sudo systemctl stop firerouter_pppd@${this.name}`).catch((err) => {});
await exec(`rm -f ${this._getConfFilePath()}`).catch((err) => {});
async flushIP(af = null) {
if (!af) {
await exec(`sudo systemctl stop firerouter_pppd@${this.name}`).catch((err) => {});
await exec(`rm -f ${this._getConfFilePath()}`).catch((err) => {});
} else
await super.flushIP(af);
}

isWAN() {
Expand Down

0 comments on commit ece4722

Please sign in to comment.