]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Made the distccd port configureable in .config.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Oct 2008 17:08:43 +0000 (17:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Oct 2008 17:08:43 +0000 (17:08 +0000)
.config-default
tools/make-compilers

index 60f1db8288b22bc271b46e94af1da763a05fca96..fed3864af303c8cad09dbb3c44bdafd0a70b9258 100644 (file)
 #PARALLELISMFLAGS=-j3
 
 ###############################################################################
-# Distcc Hosts                                                                #
+# Distcc Config                                                               #
 ###############################################################################
-# Distcc lets you run some instances of gcc on other dedicated machines.      #
-# In this list you add the adresses of the hosts. Note that there is no dns   #
-# available in the chroot.                                                    #
+# DISTCC_PORT: Allows the definition of an other port than the default one.   #
+# If you change this, you need to restart the local distcc daemon.            #
+# Default is tcp/3632. "0" disables the start of the distcc daemon.           #
+#                                                                             #
+# DISTCC_HOSTS: Distcc lets you run some instances of gcc on other dedicated  #
+# machines. In this list you add the adresses of the hosts. Note that there   #
+# is no dns available in the chroot.                                          #
 # Default is compling on localhost only.                                      #
 ###############################################################################
 
+#DISTCC_PORT=3632
 #DISTCC_HOSTS="localhost"
 
 ###############################################################################
index 1927a6b6e51a2ffdbcacc58766210c1a93a11941..55b4e10a221a1f11caadb255a9f7674d155b1323 100755 (executable)
@@ -51,7 +51,14 @@ distcc_mon() {
 
 distccd_start() {
        echo -n "Running distcc daemon"
-       TOOLS_DIR=$TOOLS_DIR $BASEDIR/tools/make-compilers &
+
+       if [ "$DISTCC_PORT" == "0" ]; then
+               beautify message DISA
+               return
+       fi
+
+       TOOLS_DIR=$TOOLS_DIR DISTCC_PORT=$DISTCC_PORT \
+               $BASEDIR/tools/make-compilers &
        if [ "$?" -eq "0" ]; then
                beautify message DONE
        else
@@ -76,12 +83,12 @@ distccd_restart() {
 
 if [ "$(basename $0)" == "make-compilers" ]; then
        # Exit, when distccd is already running
-       pidof distccd >/dev/null && exit 1
+       pidof distccd &>/dev/null && exit
 
        # Run distccd
        DISTCCD_PATH=$TOOLS_DIR/bin:$(echo $TOOLS_DIR/libexec/gcc/*-pc-linux-gnu/*/) \
                $TOOLS_DIR/usr/bin/distccd --daemon --allow 0.0.0.0/0 \
-               --user nobody --nice 10 --jobs 4 &>/dev/null
+               --user nobody --nice 10 --jobs 4 --port ${DISTCC_PORT-3632} &>/dev/null
 
        # When $TOOLS_DIR is not available (esp. gcc) --> exit
        while pidof distccd >/dev/null && [ -x $TOOLS_DIR/bin/gcc ]; do