Hi Thomas:

Does this work?

Index: sbin/si_getimage
===================================================================
--- sbin/si_getimage    (revision 4539)
+++ sbin/si_getimage    (working copy)
@@ -197,10 +197,12 @@
 }

 # be sure $update_script was passed a proper option
-unless(
-       ($update_script eq "yes")
-    or ($update_script eq "no" )
-) { die "\n$program_name: --update-script must be yes or no.\n$get_help\n\n"; }
+if (defined $update_script) {
+  unless(
+         ($update_script eq "yes")
+      or ($update_script eq "no" )
+  ) { die "\n$program_name: --update-script must be yes or
no.\n$get_help\n\n"; }
+}

 SystemImager::Server->validate_ip_assignment_option($ip_assignment_method);
 SystemImager::Server->validate_post_install_option($post_install);
@@ -528,7 +530,9 @@
 }

 # if we don't need to update the master script, then exit -- we're done
-unless($update_script eq "yes") { exit 0; }
+if (defined $update_script) {
+  unless($update_script eq "yes") { exit 0; }
+}

 ### END Overwrite $script_name.master? ###

Thanks,

Bernard

On Fri, Apr 8, 2011 at 7:58 AM, Thomas Zeiser
<thomas.zei...@rrze.uni-erlangen.de> wrote:
> On Thu, Apr 07, 2011 at 05:11:26PM -0700, Bernard Li wrote:
>> This seems to be a better patch, as it also catches if the user
>> specified --update-script '' on the CLI:
>>
>> Index: sbin/si_getimage
>> ===================================================================
>> --- sbin/si_getimage  (revision 4539)
>> +++ sbin/si_getimage  (working copy)
>> @@ -197,10 +197,12 @@
>>  }
>>
>>  # be sure $update_script was passed a proper option
>> -unless(
>> -       ($update_script eq "yes")
>> -    or ($update_script eq "no" )
>> -) { die "\n$program_name: --update-script must be yes or 
>> no.\n$get_help\n\n"; }
>> +if (defined $update_script) {
>> +  unless(
>> +         ($update_script eq "yes")
>> +      or ($update_script eq "no" )
>> +  ) { die "\n$program_name: --update-script must be yes or
>> no.\n$get_help\n\n"; }
>> +}
>>
>>  SystemImager::Server->validate_ip_assignment_option($ip_assignment_method);
>>  SystemImager::Server->validate_post_install_option($post_install);
>
> That's only half of the storry; you also need the following part;
>
> ==========
> @@ -531,7 +531,7 @@
>  }
>
>  # if we don't need to update the master script, then exit -- we're
>  # done
> -unless($update_script eq "yes") { exit 0; }
> +unless((defined($update_script)) and ($update_script eq "yes")) { exit 0; }
>
>  ### END Overwrite $script_name.master? ###
>
> ==========
>
>
> Best,
>
> thomas
>

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to