File: //proc/self/root/scripts.20110531.215904.25158/supportvoidcheck
#!/usr/bin/perl
# cpanel10 - supportvoidcheck Copyright(c) 2005 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited
use strict;
exit if ( ! -e '/etc/redhat-release' && ! -e '/etc/mandrake-release');
my %FILES = ( '/etc/exim.conf' => 0,
'/etc/hosts' => 1,
'/scripts/wwwacct' => 1,
'/etc/resolv.conf' => 1,
'/etc/localdomains' => 1,
'/etc/remotedomains' => 1,
'/etc/exim.pl' => 0
);
my @MODFILES;
my @LSATTR = split(/\n/,`lsattr /etc 2>/dev/null;lsattr /scripts 2>/dev/null`);
foreach my $file (@LSATTR) {
my ($perms,$file) = split(/ /, $file);
next if (!$FILES{$file});
if ($perms =~ /i/) {
print "Warning! unsupported modifcations to $file (chattr +i)\n";
push(@MODFILES,$file);
}
}
if ($#MODFILES > -1) {
open(CPV,">/var/cpanel/supportvoid");
foreach(@MODFILES) {
print CPV $_;
print CPV "\n";
}
close(CPV);
} else {
unlink('/var/cpanel/supportvoid');
}