* Restart wpa_supplicant and dhclient on resume.
svn path=/nixos/branches/upstart-0.6/; revision=18360
This commit is contained in:
parent
0755e228bf
commit
e9b2ef9fb7
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue