* 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:
parent
4869175158
commit
e97817b577
@ -56,7 +56,8 @@ in
|
|||||||
# Create the required /bin/sh symlink; otherwise lots of things
|
# Create the required /bin/sh symlink; otherwise lots of things
|
||||||
# (notably the system() function) won't work.
|
# (notably the system() function) won't work.
|
||||||
mkdir -m 0755 -p /bin
|
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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user