diff --git a/server/networkManager.js b/server/networkManager.js index a7ffaf3a..615d2f50 100644 --- a/server/networkManager.js +++ b/server/networkManager.js @@ -67,7 +67,7 @@ function addConnection(conNameStr, conType, conAdapter, conSettings, callback) { if (conType === "wifi") { exec('nmcli connection add type ' + conType + " ifname " + conAdapter + " con-name " + conNameStr + " ssid " + conSettings.ssid.value + " 802-11-wireless.mode " + - conSettings.mode.value + " 802-11-wireless.band " + conSettings.band.value + + conSettings.mode.value + (conSettings.band === {} ? (' 802-11-wireless.band ' + conSettings.band.value) : '') + " ipv4.method " + conSettings.ipaddresstype.value + " connection.autoconnect no " + " && " + "nmcli -g connection.uuid con show " + conNameStr, (error, stdout, stderr) => { if (stderr) { diff --git a/src/networkconfig.js b/src/networkconfig.js index a8407012..dcec9cc8 100644 --- a/src/networkconfig.js +++ b/src/networkconfig.js @@ -455,7 +455,7 @@ class NetworkConfig extends basePage { this.setState({ showModal: false}); var nm = this.state.netConnectionFilteredSelected.label; this.setState({netConnectionFilteredSelected: {value: 'new', label: nm, type: this.state.netDeviceSelected.type, state: ""}, - curSettings: {mode: {value: "infrastructure"}, ipaddresstype: {value: "auto"}, band: {value: "bg"}, ssid: {value: ""}, ipaddress: {value: ""}, subnet: {value: ""}, wpaType: {value: "wpa-psk"}, password: {value: ""}, attachedIface: {value: '""'}}}); + curSettings: {mode: {value: "infrastructure"}, ipaddresstype: {value: "auto"}, band: {value: ""}, ssid: {value: ""}, ipaddress: {value: ""}, subnet: {value: ""}, wpaType: {value: "wpa-psk"}, password: {value: ""}, attachedIface: {value: '""'}}}); } renderContent() {