#!/bin/sh
# disable suspend on particular models

[ "$1" = suspend ] || exit 0

# LP#526354 workaround
if grep -q '^Dell' /sys/class/dmi/id/sys_vendor; then
    if egrep -q '^Studio.*(1537|1555|1640)' /sys/class/dmi/id/product_name; then
        echo "Suspend causes overheating and stopping of the fan. Please see https://launchpad.net/bugs/526354" >&2
        exit 1
    fi
fi

exit 0
