PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

suspend to ram, inspiron 9300


Your Ad Here

Your Ad Here

Linux 'loses' 1st job to print server
Hi, Running Red Hat ES v3.0 and have set up several print queues using CUPS to both local and remote sites. All printers are attached to print servers (a variety of D-Links and...

I've put some comments in the script and a few ideas at the end.

Jeremy D. Jackson if -esuspending ; then exit 1;

If the script is already running, then you'd want to terminate here. "exit 1" is a non-zero exit status which implies an error or abnormal exit status. This is a better approach to just falling through IMHO.

Hmmm, personally I wouldn't use "rmmod" in this situation, instead I'd use "modprobe -r" which will remove the module and any dependant modules too. "rmmod" does not bother removing dependancies. ^^^^^^^^^^^^^^^^^^^ See comment above rmmod vs modprobe -r

Hmmm, I'm no acpi expert, but it seems you have the suspend and resume actions in the one script. If this is what you want, then consider putting all the suspend actions in a function and all the resume-wake-up actions in another function. That way you can employ some finer-grained logic; the way I read your script, it will suspend immediately on resume, because the suspend actions happen before the resume, so the resume actions are never run. eg,

#!-bin-bash

SUSPENDLCK=-var-tmp-suspend-lock RESUMELCK=-var-tmp-resume-lock PREVIOUS=-var-tmp-suspended

# Function to suspend the system suspend() { # All actions to suspend the system touch $SUSPENDLCK ... rm $SUSPENDLCK touch $PREVIOUS bin-sync }

# Function to resume-wake-up the system resume() { # All actions to reume-wake-up the system touch $RESUMELCK ... rm $RESUMELCK }

# Make sure we're not already suspending if -e $SUSPENDLCK ; then echo "Suspend in progress, please wait" exit 1 fi

# Make sure we're not already resuning if -e $RESUMELCK ; then echo "Wake-up-Resume in progress, please wait" exit 1 fi

Apache2 and logrotate
Hi group, I'm using two DELL machines with OS SuSE 9.0 Professional installed. Each machine owns an Apache2-instance (apache2-2.0.54-1) delivering HTTP content. The Apache2-configuration...

# Check to see if this should be a suspend or resume run.... if -e $PREVIOUS ; then rm $PREVIOUS resume else suspend fi

### END SCRIPT

The logic is; if suspend-resume is already in progress, bail out with an error. if the file $PREVIOUS exits, delete it and run the resume function if the file $PREVIOUS doesn't exist, run the suspend function (suspend() function leaves the $PREVIOUS file behind before finishing)

Make sense?

James -- Smile! You're on Candid Camera.



Your Ad Here

List | Previous | Next

Apache2 and logrotate

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

WOL Wakeup On LAN