1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

* Atomically replace the /bin/sh symlink; otherwise there is a time

window in which /bin/sh is missing.  This can cause concurrently
  running programs to fail (e.g. Hydra jobs =>
  http://hydra.nixos.org/build/2267831).  You'd think the odds of this
  are very low, but they're not.

svn path=/nixos/trunk/; revision=32901
This commit is contained in:
Eelco Dolstra 2012-03-08 16:08:03 +00:00
parent 4869175158
commit e97817b577

View file

@ -56,7 +56,8 @@ in
# Create the required /bin/sh symlink; otherwise lots of things
# (notably the system() function) won't work.
mkdir -m 0755 -p /bin
ln -sfn ${config.system.build.binsh}/bin/sh /bin/sh
ln -sfn ${config.system.build.binsh}/bin/sh /bin/.sh.tmp
mv /bin/.sh.tmp /bin/sh # atomically replace /bin/sh
'';
}