initial commit of file from CVS for e-smith-hosts on Wed 12 Jul 08:56:08 BST 2023
This commit is contained in:
10
root/etc/e-smith/db/hosts/migrate/30sanitise_host_comment
Normal file
10
root/etc/e-smith/db/hosts/migrate/30sanitise_host_comment
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
# Purge quoting chars in comments to fix bug 8723 & bug 8806
|
||||
foreach my $host ($DB->get_all)
|
||||
{
|
||||
my $comment = $host->prop('Comment');
|
||||
next unless $comment;
|
||||
$comment =~ s/[^a-zA-Z0-9\ \_\-\,\.]+//g;
|
||||
$host->merge_props(Comment => $comment);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user