utils should only contain functions
This commit is contained in:
parent
e3627b666f
commit
f7dca26bd3
@ -37,6 +37,7 @@ HOTSPOT_PASSPHRASE="${PROJECT_NAME}"
|
||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
|
||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-mesh
|
||||
|
||||
mesh_protocol_init
|
||||
update_wifi_adaptors
|
||||
|
||||
if [ ! $IFACE ]; then
|
||||
|
@ -37,6 +37,7 @@ HOTSPOT_PASSPHRASE="${PROJECT_NAME}"
|
||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
|
||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-mesh
|
||||
|
||||
mesh_protocol_init
|
||||
update_wifi_adaptors
|
||||
|
||||
if [ ! $IFACE ]; then
|
||||
|
@ -28,6 +28,7 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
function mesh_protocol_init {
|
||||
if [[ $1 == "start" ]]; then
|
||||
# install avahi
|
||||
sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf
|
||||
@ -78,6 +79,7 @@ if [ $WLAN_ADAPTORS -eq 0 ]; then
|
||||
echo $'No wlan adaptors found'
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
function get_ipv4_wlan {
|
||||
echo $(ip -o -f inet addr show dev "$IFACE" | awk '{print $4}' | awk 'END {print}' | awk -F '/' '{print $1}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user