#!/bin/sh # # hibernate-cleanup cleanses swsusp and Software Suspend 2 images. # # chkconfig: 12345 01 90 # description: This script evokes hibernate-cleanup.sh # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions RETVAL=0 LOCKFILE=/var/lock/subsys/hibernate-cleanup SWSUSP2_CLEANUP=/etc/rc.d/scripts/hibernate-cleanup.sh start() { if [ -f $SWSUSP2_CLEANUP ] ; then action "Cleaning swsusp and Software Suspend 2 images: " $SWSUSP2_CLEANUP start RETVAL=$? touch $LOCKFILE fi return $RETVAL } stop() { rm -f $LOCKFILE return $RETVAL } restart() { start } # See how we were called. case "$1" in start) start ;; stop) stop ;; condstop) stop ;; restart) restart ;; condrestart) ;; condreload) ;; *) msg_usage "${0##*/} {start|stop|restart|condrestart|condstop|condreload}" RETVAL=1 esac exit $RETVAL