How to execute a script after standby/resume?
I have SuSe 9.1 installed on IBM Thinkpad T41 and I'm using powersave and apm for power management. Whenever I do standby/resume the wireless card, cisco vpn client, thinkpad buttons (tpb) and vmware modules get broken so I have to restart those. Basically each time I resume the laptop from a standby I have to type in a lot of commands:
su
<password>
rmmod ipw2200
modprobe ipw2200
ifdown eth1
ifup eth1
/etc/init.d/vpnclient_init restart
/etc/init.d/vmware restart
su stan --command="tpb &"
I wrote a script to do just that, so all I have to do is launch the script and type in the root password. Is there a way to launch the script automatically every time I resume the laptop from standby? I find it inconvenient and insecure to type in root password every day 24/7, I use the laptop in a classrom and I always have people looking over my shoulder gazing at my beautiful KDE desktop.
|