Changeset 366
- Timestamp:
- Sep 17, 2018, 1:54:16 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r365 r366 21 21 use strict; 22 22 #use warnings; 23 use version; our $VERSION = version->declare('0.1 1.9');23 use version; our $VERSION = version->declare('0.12.0'); 24 24 25 25 use Getopt::Long qw(GetOptions); … … 1066 1066 1067 1067 if ($tags !~ m/^ (?:\w+,)* \w+ $/xms) { 1068 die "Error: bad format for tags (comma separated list): $tags \n";1068 die "Error: bad format for tags (comma separated list): $tags [FAILED]\n"; 1069 1069 } 1070 1070 1071 1071 for my $tag (split/,/, $tags) { 1072 1072 next if $tag eq 'universal'; 1073 die "Error: TAG doesn't exist in the database. Create it before with create_tag: $tag\n" if not exists $computer_db->{'tag'}{$tag};1073 die "Error: TAG $tag doesn't exist in the database. Create $tag with command create_tag [FAILED]\n" if not exists $computer_db->{'tag'}{$tag}; 1074 1074 } 1075 1075 … … 1091 1091 delete $attribute->{'tag'} if $tags eq 'universal'; 1092 1092 ipamdb_save("$COMPUTER_YAML", $computer_db); 1093 print "Info: update host $hostname sector $sector tags $tags [OK]\n"; 1093 1094 exit; 1094 1095 } 1095 print "Mise à jour du commentaire de la machine [FAILED]\n"; 1096 print "L'adresse MAC: $mac n'existe pas dans le domaine: $sector.\n"; 1096 die "Error: no host $hostname in sector $sector has MAC $mac [FAILED]\n"; 1097 1097 } 1098 1098 … … 1135 1135 next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname; 1136 1136 1137 die "Warning: host $hostname already of type $type \n" if $attribute->{'address_type'} eq $type;1137 die "Warning: host $hostname already of type $type [FAILED]\n" if $attribute->{'address_type'} eq $type; 1138 1138 1139 1139 $attribute->{'address_type'} = $type; … … 1141 1141 1142 1142 ipamdb_save("$COMPUTER_YAML", $computer_db); 1143 print "Info: update host $hostname sector $sector type $type [OK]\n"; 1143 1144 exit; 1144 1145 }
Note: See TracChangeset
for help on using the changeset viewer.