#!/bin/bash # # configuration script for encrypted suspend # # (C) 2008 Stefan Seyfried SUSE Linux Products GmbH # released under the GPL V2 CONF=/etc/suspend.conf if [ $UID != 0 ]; then echo "Sorry, this configuration script needs root privileges." echo "Exiting now..." echo exit 1 fi cat <> $CONF # if we have more than one CPU / core, enabling threads will speed up # suspend. NUMCPU=$(grep -c ^processor /proc/cpuinfo) if [ $NUMCPU -gt 1 ]; then # remove the threads setting... sed -i '/^threads /d; ' $CONF # ..and add it back. echo "threads = y" >> $CONF fi echo echo "/etc/suspend.conf written, you can find the original file as /etc/suspend.conf.backup" echo