summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/VServer.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/VServer.pm b/lib/VServer.pm
index 8c70bde..cb2e351 100644
--- a/lib/VServer.pm
+++ b/lib/VServer.pm
@@ -1,7 +1,7 @@
#!/usr/bin/perl -T
package VServer;
-our $VERSION = '1.0';
+our $VERSION = '1.1';
use strict;
use warnings;
@@ -37,4 +37,14 @@ sub get_proc_dir($) {
return undef;
}
+sub get_config_dir($) {
+ my $context = shift;
+
+ my $dir = qx(/usr/sbin/vuname --xid $context --get context 2> /dev/null);
+ return undef unless ($? eq 0);
+
+ chomp($dir);
+ return $dir;
+}
+
1;