gluon-core: port initial/020-wireless to lua

This commit is contained in:
Nils Schneider 2014-09-15 19:50:10 +02:00
parent 53e56b0853
commit 0de7bf5f64

View File

@ -1,14 +1,7 @@
#!/bin/sh
#!/usr/bin/lua
. /lib/functions.sh
local uci = require('luci.model.uci').cursor()
config_load wireless
delete_iface() {
local iface="$1"
uci_remove wireless "$iface"
}
config_foreach delete_iface 'wifi-iface'
uci_commit wireless
uci:delete_all('wireless', 'wifi-iface')
uci:save('wireless')
uci:commit('wireless')