mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
build-fhs-userenv: move /tmp handling to bash part
This commit is contained in:
parent
ec27ba44d0
commit
f1187c5b14
@ -14,10 +14,6 @@ mounts = [ ['/nix/store', nil],
|
||||
['/root', nil],
|
||||
]
|
||||
|
||||
# Create directories
|
||||
mkdirs = ['tmp',
|
||||
]
|
||||
|
||||
# Propagate environment variables
|
||||
envvars = [ 'TERM',
|
||||
'DISPLAY',
|
||||
@ -100,9 +96,6 @@ if $cpid == 0
|
||||
write_file '/proc/self/uid_map', "#{uid} #{uid} 1"
|
||||
write_file '/proc/self/gid_map', "#{gid} #{gid} 1"
|
||||
|
||||
# Do mkdirs
|
||||
mkdirs.each { |x| FileUtils.mkdir_p "#{root}/#{x}" }
|
||||
|
||||
# Do rbind mounts.
|
||||
mounts.each do |x|
|
||||
to = "#{root}/#{x[1]}"
|
||||
|
@ -10,6 +10,9 @@ let
|
||||
'';
|
||||
|
||||
init = writeText "init" ''
|
||||
# Make /tmp directory
|
||||
mkdir -m 1777 /tmp
|
||||
|
||||
# Expose sockets in /tmp
|
||||
for i in /host-tmp/.*-unix; do
|
||||
ln -s "$i" "/tmp/$(basename "$i")"
|
||||
|
Loading…
Reference in New Issue
Block a user