Commit e9b2ef9f authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Restart wpa_supplicant and dhclient on resume.

svn path=/nixos/branches/upstart-0.6/; revision=18360
parent 0755e228
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -103,6 +103,22 @@ in
        }
      ];

    powerManagement.resumeCommands =
      ''
        export PATH=${config.system.build.upstart}/sbin:$PATH
      
        restart() {
            local job="$1"
            if initctl status "$job" 2> /dev/null | grep -q 'running'; then
                initctl stop "$job"
                initctl start "$job"
            fi
        }

        restart wpa_supplicant      
        restart dhclient
      '';

  };  
  
}