Author: eelco
Date: Mon Dec 6 19:03:32 2010
New Revision: 25017
URL: https://svn.nixos.org/websvn/nix/?rev=25017&sc=1
Log:
* Run smbd in its own session / process group (setsid) because smbd
now kills its process group when it exits. Without setsid, this
ends up killing the parent (i.e., the builder).
* Use port 445 instead of 139 because the CIFS kernel module tries
port 445 first. If there is an actual Samba running on the host, it
would end up connecting to that one instead of our own and fail.
Modified:
nixpkgs/trunk/pkgs/build-support/vm/default.nix
Modified: nixpkgs/trunk/pkgs/build-support/vm/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/build-support/vm/default.nix Mon Dec 6 19:02:24
2010 (r25016)
+++ nixpkgs/trunk/pkgs/build-support/vm/default.nix Mon Dec 6 19:03:32
2010 (r25017)
@@ -216,7 +216,7 @@
-nographic -no-reboot \
-net nic,model=virtio \
-chardev socket,id=samba,path=./samba \
- -net user,guestfwd=tcp:10.0.2.4:139-chardev:samba \
+ -net user,guestfwd=tcp:10.0.2.4:445-chardev:samba \
-drive file=$diskImage,if=virtio,boot=on,cache=writeback,werror=report \
-kernel ${kernel}/bzImage \
-initrd ${initrd}/initrd \
@@ -247,7 +247,7 @@
SMB
rm -f ./samba
- ${socat}/bin/socat unix-listen:./samba exec:"${samba}/sbin/smbd -s
$TMPDIR/smb.conf",nofork > /dev/null 2>&1 &
+ ${socat}/bin/socat unix-listen:./samba exec:"${utillinux}/bin/setsid
${samba}/sbin/smbd -s $TMPDIR/smb.conf",nofork > /dev/null 2>&1 &
while [ ! -e ./samba ]; do sleep 0.1; done # ugly
'';
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits