#!/bin/bash #============================================================================== # Author: Stefan Bader # Copyright (C) 2010 # # This script is distributed under the terms and conditions of the GNU General # Public License, Version 3 or later. See http://www.gnu.org/copyleft/gpl.html # for details. #============================================================================== DMIDIR=/sys/class/dmi/id HIBMETH=/sys/power/disk # # For now this needs dmi information in /sys, otherwise just skip it. # if [ ! -d $DMIDIR ]; then exit 0 fi # # Only change the method for hibernate # if [ "$1" != "hibernate" ]; then exit 0 fi case "$(cat $DMIDIR/sys_vendor)" in Acer*) case "$(cat $DMIDIR/product_name)" in TravelMate\ 8100) echo "shutdown" >$HIBMETH ;; esac ;; esac exit 0