* Retry CIFS mounts a few times. Hopefully this fixes problems such

as in http://hydra.nixos.org/build/79029 (i.e. "CIFS VFS: No
  response for cmd 114 mid 1", "CIFS VFS: cifs_mount failed w/return
  code = -112").

svn path=/nixpkgs/trunk/; revision=17365
This commit is contained in:
Eelco Dolstra 2009-09-23 15:17:47 +00:00
parent 251c7207cf
commit f467c6d131

View File

@ -102,7 +102,18 @@ rec {
mkdir -p /fs/dev
mount -o bind /dev /fs/dev
mount.cifs //10.0.2.4/qemu /fs/hostfs -o guest,username=nobody
n=.
echo "mounting host filesystem..."
while true; do
if mount.cifs //10.0.2.4/qemu /fs/hostfs -o guest,username=nobody; then
break
else
n=".$n"
test ''${#n} -le 10 || exit 1
sleep 1
echo "retrying..."
fi
done
mkdir -p /fs/nix/store
mount -o bind /fs/hostfs/nix/store /fs/nix/store