mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 10:52:31 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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"; | ||||
|   | ||||
| @@ -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; | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user