Commit 90ee81ae authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add AddEnvVariable() routine to augment virt_user_environment table.

parent a4d8a2a5
......@@ -572,6 +572,27 @@ sub WebKeyPath($)
return UserDir($self) . "/tbdata/webkey";
}
#
# Add an environment variable.
#
sub AddEnvVariable($$$)
{
my ($self, $var, $val) = @_;
# Must be a real reference.
return -1
if (! ref($self));
my $pid = $self->pid();
my $eid = $self->eid();
return -1
if (! DBQueryWarn("insert into virt_user_environment set ".
" name='$var', value='$val', ".
" pid='$pid', eid='$eid'"));
return 0;
}
#
# Experiment locking and state changes.
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment