3
0
Fork 0
forked from mirrors/nixpkgs

* Urgh, if $TMPDIR is very long we run into the 108 character limit on

Unix domain socket paths.  So use ./samba instead of $TMPDIR/samba.

svn path=/nixpkgs/trunk/; revision=22256
This commit is contained in:
Eelco Dolstra 2010-06-14 11:18:57 +00:00
parent b88adf69c3
commit b570419efa

View file

@ -212,7 +212,7 @@ rec {
qemuCommandLinux = ''
qemu-system-x86_64 \
-nographic -no-reboot \
-net nic,model=virtio -chardev socket,id=samba,path=$TMPDIR/samba -net user,guestfwd=tcp:10.0.2.4:139-chardev:samba \
-net nic,model=virtio -chardev socket,id=samba,path=./samba -net user,guestfwd=tcp:10.0.2.4:139-chardev:samba \
-drive file=$diskImage,if=virtio,boot=on,cache=writeback,werror=report \
-kernel ${kernel}/bzImage \
-initrd ${initrd}/initrd \
@ -253,8 +253,9 @@ rec {
#! ${bash}/bin/sh
diskImage=$diskImage
TMPDIR=$TMPDIR
${socat}/bin/socat unix-listen:$TMPDIR/samba system:'while true; do ${samba}/sbin/smbd -s $TMPDIR/smb.conf; done' > /dev/null 2>&1 &
while [ ! -e $TMPDIR/samba ]; do sleep 0.1; done # ugly
cd $TMPDIR
${socat}/bin/socat unix-listen:./samba system:'while true; do ${samba}/sbin/smbd -s $TMPDIR/smb.conf; done' > /dev/null 2>&1 &
while [ ! -e ./samba ]; do sleep 0.1; done # ugly
${qemuCommand}
EOF