Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
cfe6b5ad
Commit
cfe6b5ad
authored
Dec 10, 2003
by
Leigh B. Stoller
Browse files
Fix up problem with symlinks getting left behind from /proj to /groups.
parent
33de8f8c
Changes
2
Show whitespace changes
Inline
Side-by-side
db/libdb.pm.in
View file @
cfe6b5ad
...
...
@@ -25,6 +25,7 @@ use Exporter;
PROJMEMBERTRUST_ROOT
PROJMEMBERTRUST_GROUPROOT
PROJMEMBERTRUST_PROJROOT
PROJROOT
GROUPROOT
USERROOT
PLABMOND_PID
PLABMOND_EID
PLABHOLDING_PID
PLABHOLDING_EID
TBTrustConvert
TBMinTrust
TBGrpTrust
TBProjTrust
...
...
@@ -193,6 +194,9 @@ my $BOSSNODE = "@BOSSNODE@";
my
$
TESTMODE
=
@
TESTMODE
@;
my
$
TBOPSPID
=
"emulab-ops"
;
my
$
SCRIPTNAME
=
"Unknown"
;
my
$
PROJROOT
=
"/proj"
;
my
$
GROUPROOT
=
"/groups"
;
my
$
USERROOT
=
"/users"
;
if
($
EVENTSYS
)
{
require
event
;
...
...
@@ -277,6 +281,9 @@ sub PLABMOND_PID() { $TBOPSPID; }
sub PLABMOND_EID() { "plab-monitor"; }
sub PLABHOLDING_PID() { $TBOPSPID; }
sub PLABHOLDING_EID() { "plabnodes"; }
sub PROJROOT() { $PROJROOT; }
sub GROUPROOT() { $GROUPROOT; }
sub USERROOT() { $USERROOT; }
sub NODEBOOTSTATUS_OKAY() { "okay" ; }
sub NODEBOOTSTATUS_FAILED() { "failed"; }
...
...
@@ -2527,6 +2534,7 @@ sub TBExptDestroy($$)
my $workdir = TBExptWorkDir($pid, $eid);
my $userdir = TBExptUserDir($pid, $eid);
my $gid = ExpGroup($pid, $eid);
#
# Try to remove experiment directory. We allow for it not being there
...
...
@@ -2544,6 +2552,12 @@ sub TBExptDestroy($$)
print "*** WARNING: Not able to remove $workdir\n";
print " Someone will need to do this by hand.\n";
}
# Yuck.
if ($pid ne $gid) {
my $eidlink = "$PROJROOT/$pid/exp/$eid";
unlink($eidlink)
if (-l $eidlink);
}
#
# Remove all trace from the DB.
...
...
tbsetup/mkexpdir.in
View file @
cfe6b5ad
...
...
@@ -28,8 +28,8 @@ my $TBOPS = "@TBOPSEMAIL@";
#
# Should be configured.
#
my
$projroot
=
"
/proj
"
;
my
$grouproot
=
"
/groups
"
;
my
$projroot
=
PROJROOT
()
;
my
$grouproot
=
GROUPROOT
()
;
#
# Testbed Support libraries
...
...
@@ -172,7 +172,7 @@ if (! chown($UID, $unix_gid, "$workdir")) {
if
(
$pid
ne
$gid
)
{
# XXX Bad. This link should be removed when the experiment is removed.
unlink
(
$eidlink
)
if
(
-
e
$eidlink
);
if
(
-
l
$eidlink
);
symlink
(
$eiddir
,
$eidlink
)
or
fatal
("
Could not symlink(
$eiddir
,
$eidlink
): $!
");
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment