mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2006-09-23, 18:27   #1
patrik
 
patrik's Avatar
 
"Patrik Johansson"
Aug 2002
Uppsala, Sweden

52·17 Posts
Default rc.local in SuSE linux?

I'm trying out SuSE Linux now--I used RedHat earlier. However, I can't find the rc.local file, and I never learnt how to do "the full Sys V init stuff". (Quote from RedHat rc.local.)

Is there a similar file with another name, or how should I start my mprime on this OS? Suggestions? I know about the (IMHO) ugly solution of starting it e.g. every 5 minutes in a cron job. Is there a better way to do it?
patrik is offline   Reply With Quote
Old 2006-09-23, 19:05   #2
patrik
 
patrik's Avatar
 
"Patrik Johansson"
Aug 2002
Uppsala, Sweden

52·17 Posts
Default

I just found the answer myself (in /etc/init.d/README).

In SuSE the file name is /etc/init.d/boot.local.
patrik is offline   Reply With Quote
Old 2006-09-24, 10:58   #3
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,739 Posts
Default

Quote:
I know about the (IMHO) ugly solution of starting it e.g. every 5 minutes in a cron job. Is there a better way to do it?
Answer
paulunderwood is offline   Reply With Quote
Old 2006-09-25, 14:00   #4
victor
 
victor's Avatar
 
Oct 2005
Fribourg, Switzerlan

111111002 Posts
Default

Quote:
#!/sbin/runscript

start() {
ebegin "Starting MPrime"
tail -n1 /home/victor/Primes/mprime/results.txt
start-stop-daemon --start -N16 --quiet --exec /home/victor/Primes/mprime/mprime -- -B
eend $?
}

stop() {
ebegin "Stopping MPrime"
start-stop-daemon --stop --exec /home/victor/Primes/mprime/mprime -- -B
sleep 1
tail -n1 /home/victor/Primes/mprime/results.txt
eend $?
}
Perhaps this runscript I wrote for my gentoo boxes would be useful

A few notes on it :
start-stop-daemon --start -N16 --quiet --exec /home/victor/Primes/mprime/mprime -- -B
the "-N16" asks to run mprime with nice-level 16
the 'tail's show the last line writtent in results.txt. I added this to see how far I am when booting and shutdowning my computer :)
For any other question, ask the man

(I think start-stop-daemon is a really neat command to start/stop mprime at the boot :))

(I almost forgot to say that you need to put this script in something like /etc/init.d/mprimed ;))
victor is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
GGNFS under SuSe cluster VolMike Factoring 7 2008-01-23 01:23
Affinity setting in local.ini PageFault Software 1 2006-09-13 16:39
Linux/SUSE noob trouble - Resize partition OmbooHankvald Linux 19 2005-11-18 10:39
Simple question Suse 9.0 Faraday Linux 13 2005-06-01 02:22
New Linux Local Root Exploit tinhnho Linux 0 2005-01-17 05:48

All times are UTC. The time now is 07:02.


Sat Jul 17 07:02:40 UTC 2021 up 50 days, 4:49, 1 user, load averages: 1.63, 1.78, 1.74

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.