mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +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],
|
['/var', nil],
|
||||||
['/run', nil],
|
['/run', nil],
|
||||||
['/root', nil],
|
['/root', nil],
|
||||||
].map! { |x| [ x[0], x[1].nil? ? x[0].sub(/^\/*/, '') : x[1] ] }
|
]
|
||||||
|
|
||||||
# Create directories
|
# Create directories
|
||||||
mkdirs = ['tmp',
|
mkdirs = ['tmp',
|
||||||
@ -68,6 +68,9 @@ abort "Usage: chrootenv swdir program args..." unless ARGV.length >= 2
|
|||||||
swdir = Pathname.new ARGV[0]
|
swdir = Pathname.new ARGV[0]
|
||||||
execp = ARGV.drop 1
|
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
|
# Create temporary directory for root and chdir
|
||||||
root = Dir.mktmpdir 'chrootenv'
|
root = Dir.mktmpdir 'chrootenv'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user