~mil/f_scripts

4522c8b5a7893c6b43189a695254aac29e77beb2 — Miles Alan 8 months ago 1db55f8 0.2
f_networks: Ensure networkmanager running on boot
1 files changed, 8 insertions(+), 0 deletions(-)

M scripts/f_networks
M scripts/f_networks => scripts/f_networks +8 -0
@@ 96,6 96,13 @@ networkslist() {
  nmcli -c no -t c show | cut -d: -f1
}

ensurenmrunning() {
  rc-service networkmanager status | grep started || {
    sudo /etc/init.d/networkmanager start
    sudo rc-update networkmanager enable
  }
}

togglenetwork() {
  NETWORK="$1"
  if nmcli -c no -t c show --active | cut -d: -f1 | grep "$NETWORK"; then


@@ 111,6 118,7 @@ main() {
  env | grep -q "^$(basename "$0" | tr '[a-z]' '[A-Z]')=" || eval "$VAR"

  installpolkitrule
  ensurenmrunning

  while true; do
    status