## OpenCA - CA Command
## (c) 2001 by Michael Bell and OpenCA Group
##
##   File Name: new_operation
##       Brief: new_operation
## Description: create a new operation
##  Parameters: -

sub cmdNew_operation {

	## read module
	my $operation = $query->param ('operation');
	my $file = getRequired ('RBAC_DIR')."/".
	           getRequired ('OPERATIONS_DIR')."/".
	           encodeName ($operation);

	## mkdir
	my $ret = `touch $file`;

	## failure?
	if ( $? ) {
		configError ( i18nGettext ("Creating Operation __OPERATION__ failed (__FILE__)!",
                                   "__OPERATION__", $operation,
                                   "__FILE__", $file) );
	}

	libDoCommand ("show_operations");
}

1;
