updated on Tue Jan 17 00:10:10 UTC 2012
[aur-mirror.git] / fah / fahpatch_6.29.diff
blob0e6e259a665965b2e017ae77340925cb70ac7ed1
1 diff -Naur blank/fah.conf.d 6.29-1/fah.conf.d
2 --- blank/fah.conf.d 1969-12-31 16:00:00.000000000 -0800
3 +++ 6.29-1/fah.conf.d 2008-08-21 16:59:05.000000000 -0700
4 @@ -0,0 +1,16 @@
5 +#
6 +# Optional user settings for foldingathome daemon
7 +#
8 +# If you prefer not to run fah as root then you can identifer a current or
9 +# specially created user here.
11 +FAH_USER=""
13 +# If you wish to associate this user with a specific group you can enter the
14 +# group name here. If left blank the default is "users".
16 +FAH_GRP=""
18 +# Place any additionnal Folding@Home client flags here
20 +FAH_CLIENT_FLAGS="-smp -verbosity 9 -forceasm"
21 diff -Naur blank/fah.license 6.29-1/fah.license
22 --- blank/fah.license 1969-12-31 16:00:00.000000000 -0800
23 +++ 6.29-1/fah.license 2008-08-21 16:59:27.000000000 -0700
24 @@ -0,0 +1,26 @@
25 +Folding@Home distributed computing client
26 +Copyright 2001-2007. Stanford University. All Rights Reserved.
28 +License Agreement:
30 +Please carefully read the following terms and conditions before using this software. Use of this software
31 +indicates acceptance of this license agreement and disclaimer of all warranties.
33 +Disclaimer of Warranty:
35 +IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
36 +OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
37 +DOCUMENTATION, EVEN IF STANFORD UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 +STANFORD UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED
39 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING
40 +DOCUMENTATION PROVIDED HEREUNDER IS PROVIDED "AS IS". Folding@home HAS NO OBLIGATION TO PROVIDE
41 +MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
43 +Restrictions:
45 +You may use this software on a computer system only if you own the system or have the permission of the owner.
46 +You may not alter the software or associated data files.
47 +You may only use unmodified versions of Folding@home obtained through authorized distributors to connect
48 +to the Folding@Home servers. Use of other software to connect to the Folding@home servers is strictly prohibited.
49 +Distribution of this software is prohibited. It may only be obtained by downloading from Stanford's web site
50 +(http://folding.stanford.edu and pages linked therein) or the web site of one of our commercial partners (Sony, NVIDIA, and ATI).
51 diff -Naur blank/fah.rc.d 6.29-1/fah.rc.d
52 --- blank/fah.rc.d 1969-12-31 16:00:00.000000000 -0800
53 +++ 6.29-1/fah.rc.d 2008-08-21 17:00:48.000000000 -0700
54 @@ -0,0 +1,62 @@
55 +#!/bin/bash
56 +#/etc/rc.d/fah
58 +# Starts the Folding@Home client in the background
60 +. /etc/rc.conf
61 +. /etc/rc.d/functions
62 +. /etc/conf.d/fah
64 +PID=`pidof -o %PPID /opt/fah/fah6`
65 +case "$1" in
66 + start)
67 + stat_busy "Starting Folding@Home"
68 + if [ -z "$PID" ]; then
69 + if [ ! -z "$FAH_USER" ] ; then
70 + if [ ! -d "/opt/fah/$FAH_USER" ] ; then
71 + mkdir /opt/fah/$FAH_USER
72 + chown $FAH_USER /opt/fah/$FAH_USER
73 + if [ ! -z "$FAH_GRP" ] ; then
74 + chgrp $FAH_GRP /opt/fah/$FAH_USER
75 + else
76 + chgrp users /opt/fah/$FAH_USER
77 + fi
78 + touch /opt/fah/$FAH_USER/client.cfg
79 + fi
80 + cat /opt/fah/client.cfg > /opt/fah/$FAH_USER/client.cfg
81 + cd /opt/fah/$FAH_USER
82 + su $FAH_USER -c "nice --adjustment 19 /opt/fah/fah6 -verbosity 9 > /opt/fah/$FAH_USER/myfah.log" &
83 + else
84 + cd /opt/fah
85 + nice --adjustment 19 /opt/fah/fah6 -verbosity 9 > /opt/fah/myfah.log &
86 + fi
87 + fi
88 + if [ ! -z "$PID" -o $? -gt 0 ]; then
89 + stat_fail
90 + else
91 + add_daemon fah
92 + stat_done
93 + fi
94 + ;;
96 + stop)
97 + stat_busy "Stopping Folding@Home"
98 + [ ! -z "$PID" ]&& kill $PID &> /dev/null
99 + if [ $? -gt 0 ]; then
100 + stat_fail
101 + else
102 + rm_daemon fah
103 + stat_done
104 + fi
105 + ;;
107 + restart)
108 + $0 stop
109 + sleep 1
110 + $0 start
111 + ;;
113 + *)
114 + echo $"Usage: $0 {start|stop|restart}"
115 +esac