my ($target_dir, $regexp) = @_;
print STDERR "dir2text '${target_dir}${regexp}'...";
- my $text = '';
+ my $text = "# output '${target_dir}${regexp}' file(s)\n";
PVE::Tools::dir_glob_foreach($target_dir, $regexp, sub {
my ($file) = @_;
+ return if $file eq '.' || $file eq '..';
$text .= "\n# cat $target_dir$file\n";
$text .= PVE::Tools::file_get_contents($target_dir.$file)."\n";
});
order => 10,
cmds => [
'hostname',
+ 'date -R',
'pveversion --verbose',
'cat /etc/hosts',
'pvesubscription get',
'ip -details -4 route show',
'ip -details -6 route show',
'cat /etc/network/interfaces',
+ sub { dir2text('/etc/network/interfaces.d/', '.*') },
+ sub { dir2text('/etc/pve/sdn/', '.*') },
],
},
firewall => {
cmds => [
sub { dir2text('/etc/pve/firewall/', '.*fw') },
'cat /etc/pve/local/host.fw',
- 'iptables-save',
+ 'iptables-save -c | column -t -l4 -o" "',
],
},
cluster => {