Merge pull request #1037 from fewtarius/dev
Fix ordering so hostname is set properly.
This commit is contained in:
commit
08b636a24d
2 changed files with 12 additions and 0 deletions
|
@ -72,6 +72,11 @@ check_wifi() {
|
|||
}
|
||||
|
||||
connect_wifi() {
|
||||
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
|
||||
if [ ! "$?" = "0" ]
|
||||
then
|
||||
systemctl start connman
|
||||
fi
|
||||
STATE=$(get_wifi_state)
|
||||
if [ ! "${STATE}" = "online" ]
|
||||
then
|
||||
|
|
|
@ -8,6 +8,12 @@ HOSTNAME=$(get_setting system.hostname)
|
|||
hostname ${HOSTNAME}
|
||||
avahi-set-host-name ${HOSTNAME}
|
||||
|
||||
NETCHECK=$(systemctl status connman >/dev/null 2>&1)
|
||||
if [ "$?" = "0" ]
|
||||
then
|
||||
systemctl stop connman
|
||||
fi
|
||||
|
||||
if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ]
|
||||
then
|
||||
nohup wifictl disable &
|
||||
|
@ -15,3 +21,4 @@ elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ]
|
|||
then
|
||||
nohup wifictl enable &
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue