# What's Chris been doing?

Successes and failures at inf.ed.ac.uk

## hook script change

I’ve amended the hook script so that it tests for the amd component’s run file before restarting the component – because the run file should only exist while the component is running and we only want to restart the component if it was already running.

#!/bin/bash

. /etc/pm/functions

# On resume/thaw, restart the amd component if it was running, because
# amd crashes on resume if the machine has been suspended for more than
# a few minutes.
case "$1" in hibernate|suspend) ;; thaw|resume) [ -f /var/lcfg/tmp/amd.run ] && /usr/bin/om amd restart ;; *) ;; esac exit$?


Written by Chris Cooke

January 31, 2008 at 10:03 am

Posted in Uncategorized

Tagged with