tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
fhs-userenv: move mounts map
Nikolay Amiantov
10 years ago
b66be2a5
97931361
+4
-1
1 changed file
expand all
collapse all
unified
split
pkgs
build-support
build-fhs-userenv
chroot-user.rb
+4
-1
pkgs/build-support/build-fhs-userenv/chroot-user.rb
···
11
['/var', nil],
12
['/run', nil],
13
['/root', nil],
14
-
].map! { |x| [ x[0], x[1].nil? ? x[0].sub(/^\/*/, '') : x[1] ] }
15
16
# Create directories
17
mkdirs = ['tmp',
···
67
abort "Usage: chrootenv swdir program args..." unless ARGV.length >= 2
68
swdir = Pathname.new ARGV[0]
69
execp = ARGV.drop 1
0
0
0
70
71
# Create temporary directory for root and chdir
72
root = Dir.mktmpdir 'chrootenv'
···
11
['/var', nil],
12
['/run', nil],
13
['/root', nil],
14
+
]
15
16
# Create directories
17
mkdirs = ['tmp',
···
67
abort "Usage: chrootenv swdir program args..." unless ARGV.length >= 2
68
swdir = Pathname.new ARGV[0]
69
execp = ARGV.drop 1
70
+
71
+
# Set destination paths for mounts
72
+
mounts.map! { |x| [x[0], x[1].nil? ? x[0].sub(/^\/*/, '') : x[1]] }
73
74
# Create temporary directory for root and chdir
75
root = Dir.mktmpdir 'chrootenv'