361 526 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#
# Set the noexport bit for windows images.
#
use strict;
use libdb;
use libinstall;
use installvars;
use OSinfo;
use Image;

sub DoUpdate($$$)
{
    my ($dbhandle, $dbname, $version) = @_;

    my $query_result =
	DBQueryFatal("select osid from os_info ".
		     "where OS='Windows' and ezid=1");

    while (my ($osid) = $query_result->fetchrow_array()) {
	my $image = Image->Lookup($osid);
	next
	    if (!defined($image));

	$image->Update({"noexport" => 1});
    }
    return 0;
}

# Local Variables:
# mode:perl
# End: