From 728e2b5ea2f589157147dc4ead1dccd56a0cfc94 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 2 Feb 2010 11:52:39 +0000 Subject: [PATCH] relative path support for regnotif and unregnotif git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5115 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/notification.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/notification.pm b/xCAT-server/lib/xcat/plugins/notification.pm index 4838f3e0f..5a07ee0ff 100644 --- a/xCAT-server/lib/xcat/plugins/notification.pm +++ b/xCAT-server/lib/xcat/plugins/notification.pm @@ -192,6 +192,9 @@ sub regNotification { } my $fname=shift(@ARGV); + if ( fname !~ /^\// ) {#relative path + $fname = xCAT::Utils->full_path($fname); + } my $table_names=shift(@ARGV); my $table=xCAT::Table->new("notification", -create => 1,-autocommit => 0); @@ -275,6 +278,9 @@ sub unregNotification { my $fname=shift(@ARGV); + if ( $fname !~ /^\// ) {#relative path + $fname = xCAT::Utils->full_path($fname); + } my $table=xCAT::Table->new("notification", -create => 1,-autocommit => 0); if ($table) {