richard pushed to branch main at The Tor Project / Applications / RBM
Commits:
-
40acf540
by Nicolas Vigier at 2023-11-15T10:42:52+01:00
1 changed file:
Changes:
... | ... | @@ -95,7 +95,9 @@ sub run_chroot { |
95 | 95 | # On some systems resolv.conf is a symlink (see #40015)
|
96 | 96 | local $File::Copy::Recursive::CopyLink = 0;
|
97 | 97 | fcopy('/etc/resolv.conf', "$rootfsdir/etc/resolv.conf");
|
98 | - local %ENV = ();
|
|
98 | + local %ENV = (
|
|
99 | + PATH => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
|
100 | + );
|
|
99 | 101 | path("$rootfsdir/etc/hosts")->append("\n127.0.1.1 rbm\n")
|
100 | 102 | unless grep { m/^127.0.1.1 rbm$/ } path("$rootfsdir/etc/hosts")->lines;
|
101 | 103 | system('hostname', 'rbm');
|
... | ... | @@ -110,6 +112,9 @@ sub copy_file_to { |
110 | 112 | my $filename = fileparse($src);
|
111 | 113 | rcopy($src, "$rootfsdir/$dst/$filename")
|
112 | 114 | or exit_error "Failed to copy $src to $rootfsdir/$dst/$filename";
|
115 | + local %ENV = (
|
|
116 | + PATH => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
|
117 | + );
|
|
113 | 118 | return system('/usr/sbin/chroot', $rootfsdir, 'chown', '-R', $owner, $dst);
|
114 | 119 | }
|
115 | 120 |