From 4b65890eca8c61bb4448d12542d3580514f6d907 Mon Sep 17 00:00:00 2001 From: phamt Date: Wed, 15 May 2013 14:10:28 +0000 Subject: [PATCH] Fixed bug where the profile conf file is not updated on 1st edit. Fixed error messages in to use double quotes so that variables are interpreted. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16299 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/xcat/plugins/web.pm | 4 ++-- xCAT-UI/xcat/plugins/webportal.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-UI/xcat/plugins/web.pm b/xCAT-UI/xcat/plugins/web.pm index b83a5bfb3..39d9ae53d 100644 --- a/xCAT-UI/xcat/plugins/web.pm +++ b/xCAT-UI/xcat/plugins/web.pm @@ -2365,6 +2365,7 @@ sub web_mkzprofile() { my $size = $request->{arg}->[3]; # Create profile under /var/opt/xcat/profiles + `mkdir -p /var/opt/xcat/profiles`; my $var = ""; `echo "# Configuration for virtual machines" > /var/opt/xcat/profiles/$profile.conf`; $var = $profile . "_diskpool"; @@ -2372,8 +2373,7 @@ sub web_mkzprofile() { $var = $profile . "_eckd_size"; `echo "$var=$size" >> /var/opt/xcat/profiles/$profile.conf`; - # Move directory entry into /var/opt/xcat/profiles from /var/tmp - `mkdir -p /var/opt/xcat/profiles`; + # Move directory entry into /var/opt/xcat/profiles from /var/tmp `mv /var/tmp/$profile.direct /var/opt/xcat/profiles`; my $info = "Profile successfully created/updated"; diff --git a/xCAT-UI/xcat/plugins/webportal.pm b/xCAT-UI/xcat/plugins/webportal.pm index 87bd249cb..66df95545 100644 --- a/xCAT-UI/xcat/plugins/webportal.pm +++ b/xCAT-UI/xcat/plugins/webportal.pm @@ -636,13 +636,13 @@ sub clonezlinux { # Exit if default.conf does not exist if ( !(`test -e $default_conf && echo Exists`) ) { - println( $callback, '(Error) $default_conf does not exists' ); + println( $callback, "(Error) $default_conf does not exists" ); return; } # Exit if default.direct does not exist if ( !(`test -e $default_direct && echo Exists`) ) { - println( $callback, '(Error) $default_direct does not exists' ); + println( $callback, "(Error) $default_direct does not exists" ); return; }