mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
fhs-userenv: move mounts map
This commit is contained in:
parent
97931361d7
commit
b66be2a549
@ -11,7 +11,7 @@ mounts = [ ['/nix/store', nil],
|
||||
['/var', nil],
|
||||
['/run', nil],
|
||||
['/root', nil],
|
||||
].map! { |x| [ x[0], x[1].nil? ? x[0].sub(/^\/*/, '') : x[1] ] }
|
||||
]
|
||||
|
||||
# Create directories
|
||||
mkdirs = ['tmp',
|
||||
@ -68,6 +68,9 @@ abort "Usage: chrootenv swdir program args..." unless ARGV.length >= 2
|
||||
swdir = Pathname.new ARGV[0]
|
||||
execp = ARGV.drop 1
|
||||
|
||||
# Set destination paths for mounts
|
||||
mounts.map! { |x| [x[0], x[1].nil? ? x[0].sub(/^\/*/, '') : x[1]] }
|
||||
|
||||
# Create temporary directory for root and chdir
|
||||
root = Dir.mktmpdir 'chrootenv'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user