Re: How to run command on resume from "suspend"
- From: Rashkae <ubuntu@xxxxxxxxxxxxxxx>
- Date: Fri, 08 Jun 2012 11:06:44 -0400
On 06/08/2012 10:06 AM, Sam Sebastian wrote:
For all of the different version of ubuntu/linux I have used on my
computer whenever it wakes from suspend it is unable to connect to the
network until I use ifconfig to change the mac address of eth0. Is
this something that I can fix in ubuntu or is it a problem with my
router (Linksys E2000)? The command I run is "sudo ifconfig eth0 hw
ether<thechangedmacaddress>"
Thanks, Sam
Create a bash script file in /etc/pm/power.d
For example, call it 100local. See man pm-powersave for details.
Here's a sample template.
#!/bin/sh
|case $1 in
suspend)
## COMMANDS THAT YOU WISH TO RUN BEFORE SUSPEND
#COMMAND1
echo "Suspeding ..."
;;
resume)
## COMMANDS THAT YOU WISH TO RUN AFTER RESUME
||echo "Resuming ..."|
|;;
hibernate)
## COMMANDS THAT YOU WISH TO RUN BEFORE HIBERNATE
#COMMAND3
echo "Hibernating ..."
;;
thaw)
## COMMANDS THAT YOU WISH TO RUN AFTER RESUME FROM SUSPEND TO DISK
#COMMAND4
;;
esac|
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: How to run command on resume from "suspend"
- From: Rashkae
- Re: How to run command on resume from "suspend"
- References:
- How to run command on resume from "suspend"
- From: Sam Sebastian
- How to run command on resume from "suspend"
- Prev by Date: OAFIID:GNOME_WorkspaceSwitcherApplet
- Next by Date: Re: OAFIID:GNOME_WorkspaceSwitcherApplet
- Previous by thread: How to run command on resume from "suspend"
- Next by thread: Re: How to run command on resume from "suspend"
- Index(es):
Relevant Pages
|