diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2004-06-22 08:34:46 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2004-06-22 08:34:46 +0000 |
| commit | ed18bbe9cb8ce3638ed11019c62369c5f93558d1 (patch) | |
| tree | 19cb3ca6671d943e44f5efb361a53445efce0a5b /tools | |
| parent | 889608790b1fd382562ae4e2f3e3a570d7e3b10a (diff) | |
Notes
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/tools/tinderbox/tinderbox.pl | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl index 96214c84ad5ee..686e325bedf46 100644 --- a/tools/tools/tinderbox/tinderbox.pl +++ b/tools/tools/tinderbox/tinderbox.pl @@ -378,21 +378,6 @@ MAIN:{ $cmds{$cmd} = 1; } - # Take control of our sandbox - if ($sandbox !~ m|^(/[\w./-]+)$|) { - error("invalid sandbox directory"); - } - $sandbox = "$1/$branch/$arch/$machine"; - $ENV{'HOME'} = $sandbox; - make_dir($sandbox) - or error("$sandbox: $!"); - my $lockfile = open_locked("$sandbox/lock", O_RDWR|O_CREAT); - if (!defined($lockfile)) { - error("unable to lock sandbox"); - } - truncate($lockfile, 0); - print($lockfile "$$\n"); - # Open logfile open(STDIN, '<', "/dev/null") or error("/dev/null: $!\n"); @@ -412,6 +397,21 @@ MAIN:{ $SIG{__DIE__} = \&sigdie; $SIG{__WARN__} = \&sigwarn; + # Take control of our sandbox + if ($sandbox !~ m|^(/[\w./-]+)$|) { + error("invalid sandbox directory"); + } + $sandbox = "$1/$branch/$arch/$machine"; + $ENV{'HOME'} = $sandbox; + make_dir($sandbox) + or error("$sandbox: $!"); + my $lockfile = open_locked("$sandbox/lock", O_RDWR|O_CREAT); + if (!defined($lockfile)) { + error("unable to lock sandbox"); + } + truncate($lockfile, 0); + print($lockfile "$$\n"); + # Clean up remains from old runs if ($cmds{'clean'}) { logstage("cleaning the sandbox"); |
