- Timestamp:
- Jul 18, 2018, 7:19:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r304 r305 1158 1158 next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname; 1159 1159 1160 if ($attribute->{'address_type'} ne 'pool-dhcp') { 1161 1162 if ($attribute->{'enabled'} eq 'no') { 1163 print "Info: Host $hostname from domain set $domainset is already disable [OK]" . 1164 " ... Status: $attribute->{'enabled'}\n"; 1165 exit; 1166 } 1167 1168 my $timestamp = time; 1169 $attribute->{'modify_time'} = $timestamp; 1170 $attribute->{'enabled'} = 'no'; 1171 ipamdb_save("$COMPUTER_YAML", $computer_db); 1172 print "Info: Disabling host $hostname from domain set $domainset [OK]" . 1160 if ($attribute->{'address_type'} eq 'pool-dhcp') { 1161 die "Error: Host $hostname from domain set $domainset belongs to a a pool [FAILED]" . 1162 " ... use 'disable-float' command instead"; 1163 } 1164 1165 if ($attribute->{'enabled'} eq 'no') { 1166 print "Info: Host $hostname from domain set $domainset is already disable [OK]" . 1173 1167 " ... Status: $attribute->{'enabled'}\n"; 1174 1168 exit; 1175 1169 } 1176 1170 1177 if ($attribute->{'address_type'} eq 'pool-dhcp') { 1178 die "Error: Host $hostname from domain set $domainset inside a pool [FAILED]" . 1179 } 1171 my $timestamp = time; 1172 $attribute->{'modify_time'} = $timestamp; 1173 $attribute->{'enabled'} = 'no'; 1174 ipamdb_save("$COMPUTER_YAML", $computer_db); 1175 print "Info: Disabling host $hostname from domain set $domainset [OK]" . 1176 " ... Status: $attribute->{'enabled'}\n"; 1177 exit; 1180 1178 } 1181 1179 }
Note: See TracChangeset
for help on using the changeset viewer.