changeset 1735:34f7ca02767c

Fix distccd launch.
author Rob Landley <rob@landley.net>
date Sun, 15 Feb 2015 17:39:12 -0600
parents fbc625ba4098
children 0cafbd2050dc
files sources/root-filesystem/sbin/init.sh sources/toys/dev-environment.sh system-image.sh
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/sources/root-filesystem/sbin/init.sh	Sun Feb 15 15:41:39 2015 -0600
+++ b/sources/root-filesystem/sbin/init.sh	Sun Feb 15 17:39:12 2015 -0600
@@ -37,7 +37,7 @@
   then
     mkdir -p /usr/hda
     mount /dev/[hsv]da /usr/hda
-    cp -rs /usr/hda/. /
+    cp -rFs /usr/hda/. /
   fi
 
   # If there's a /dev/hdb or /dev/sdb, mount it on home, else tmpfs
@@ -67,6 +67,7 @@
     echo "Not using distcc."
   else
     echo "Distcc acceleration enabled."
+    PATH="/usr/distcc:$PATH"
   fi
   echo Type exit when done.
 
--- a/sources/toys/dev-environment.sh	Sun Feb 15 15:41:39 2015 -0600
+++ b/sources/toys/dev-environment.sh	Sun Feb 15 17:39:12 2015 -0600
@@ -61,7 +61,6 @@
 [ -z "$(which distccd)" ] && [ -e ../host/distccd ] &&
   PATH="$PATH:$(pwd)/../host"
 
-[ -z "$CPUS" ] && CPUS=1
 if [ -z "$(which distccd)" ]
 then
   echo 'No distccd in $PATH, acceleration disabled.'
@@ -108,18 +107,20 @@
     --listen 127.0.0.1 -a 127.0.0.1 -p $PORT --jobs $CPUS \
     --log-stderr --verbose 2>distccd.log &
 
+  DISTCC_PID="$(jobs -p)"
   # Clean up afterwards: Kill child processes we started (I.E. distccd).
-  trap "kill $(jobs -p)" EXIT
+  trap "kill $DISTCC_PID" EXIT
 
   # When background processes die, they should do so silently.
-  disown $(jobs -p)
+  disown $DISTCC_PID
 
   # Let the QEMU launch know we're using distcc.
 
-  DISTCC_PATH_PREFIX=/usr/distcc:
+  echo "distccd pid $DISTCC_PID port $PORT"
   KERNEL_EXTRA="DISTCC_HOSTS=10.0.2.2:$PORT/$CPUS $KERNEL_EXTRA"
 fi
 
+[ -z "$CPUS" ] && CPUS=1
 KERNEL_EXTRA="CPUS=$CPUS $KERNEL_EXTRA"
 
 # Kill our child processes on exit.
--- a/system-image.sh	Sun Feb 15 15:41:39 2015 -0600
+++ b/system-image.sh	Sun Feb 15 17:39:12 2015 -0600
@@ -16,7 +16,7 @@
 {
   echo -n "-nographic -no-reboot -kernel linux"
   [ "$SYSIMAGE_TYPE" != "rootfs" ] && echo -n " -initrd rootfs.cpio.gz"
-  echo -n " -append \"panic=1 console=$CONSOLE HOST=$ARCH $KERNEL_EXTRA\""
+  echo -n " -append \"panic=1 console=$CONSOLE HOST=$ARCH \$KERNEL_EXTRA\""
   echo -n " \$QEMU_EXTRA"
 }