source: trunk/IPs/systemC/processor/Morpheo/Script/distcc.sh

Last change on this file was 138, checked in by rosiere, 14 years ago

1) add counters_t type for interface
2) fix in check load in load_store_unit
3) add parameters (but not yet implemented)
4) change environment and add script (distcc_env.sh ...)
5) add warning if an unser change rename flag with l.mtspr instruction
6) ...

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#!/bin/sh
2
3declare DISTCCD="/users/chaos/kane/Softwares/distcc/bin/distccd";
4declare DISTCC_NICE="0";
5declare DISTCC_ADDRESS="132.227.0.0/16";
6
7#-----[ distcc_usage ]---------------------------------------------
8function distcc_usage ()
9{
10    echo "Usage : ${0} {start|stop|restart|status|uptime|clean|help}";
11    #exit 1;
12}
13
14#-----[ distcc_start ]---------------------------------------------
15function distcc_start ()
16{
17    echo  "Starting distcc services";
18
19    ${DISTCCD} --nice ${DISTCC_NICE} --daemon --allow ${DISTCC_ADDRESS};
20
21    return $?;
22}
23
24#-----[ distcc_stop ]----------------------------------------------
25function distcc_stop ()
26{
27    echo  "Shutting down distcc services";
28
29    killall ${DISTCCD};
30
31    return $?;
32}
33
34#-----[ distcc_status ]--------------------------------------------
35function distcc_status ()
36{
37    test $(ps aux | grep -c ${DISTCCD}) -gt 1;
38
39    RET=${?};
40
41    if test ${RET} -eq 0; then
42        echo "distcc is running";
43    else
44        echo "distcc is not running";
45    fi;
46
47    return ${RET};
48}
49
50#-----[ distcc_uptime ]--------------------------------------------
51function distcc_uptime ()
52{
53    uptime;
54
55    return $?;
56}
57
58#-----[ distcc_clean ]---------------------------------------------
59function distcc_clean ()
60{
61    rm -fr /tmp/*;
62
63    return $?;
64}
65
66#-----[ distcc_main ]----------------------------------------------
67function distcc_main ()
68{
69    # Test operand
70    if test ${#} -ne 1; then
71        distcc_usage ${*};
72    else
73        case ${1} in
74            "start")
75                distcc_start;
76               
77                ;;
78            "stop")
79                distcc_stop;
80                ;;
81            "restart")
82                distcc_stop;
83                distcc_start;
84                ;;
85            "status")
86                distcc_status;
87                ;;
88            "uptime")
89                distcc_uptime;
90                ;;
91            "clean")
92                distcc_clean;
93                ;;
94            *)
95                distcc_usage ${*};
96        esac;
97    fi;
98
99    unset DISTCCD;
100    unset DISTCC_NICE;
101    unset DISTCC_ADDRESS;
102
103    #exit $?;
104}
105
106#-----[ Body ]----------------------------------------------
107distcc_main ${*};
Note: See TracBrowser for help on using the repository browser.