modified: install_shell/audit_patch.sh

deleted:    install_shell/cgroup-d5000-install/42-2014-01-15-062120/README
	deleted:    install_shell/cgroup-d5000-install/42-2014-01-15-062120/install.sh
	modified:   install_shell/cgroup-d5000-install/install.sh
	modified:   install_shell/create_users.sh
	modified:   install_shell/ntpd_cron_patch.sh
	modified:   install_shell/other.sh
	modified:   install_shell/set_network.sh
	modified:   install_shell/set_ssh.sh
	modified:   setup.sh

Signed-off-by: Qin Bo <bqin@linx-info.com>
This commit is contained in:
Qin Bo
2014-02-19 11:12:23 +08:00
parent 2235771f09
commit 39d88f389f
10 changed files with 1 additions and 261 deletions

View File

@@ -1,21 +1,5 @@
#!/bin/bash
unset cron
cron=$(ls /etc/rc.d/rc[0-9].d/*cron* 2> /dev/null)
if [ -z "$cron" ];then
ln -sf /etc/rc.d/init.d/cron /etc/rc.d/rc3.d/S520cron
ln -sf /etc/rc.d/init.d/cron /etc/rc.d/rc5.d/S520cron
else
for i in $cron
do
rm $i
done
ln -sf /etc/rc.d/init.d/cron /etc/rc.d/rc3.d/S520cron
ln -sf /etc/rc.d/init.d/cron /etc/rc.d/rc5.d/S520cron
fi
if [ -f /var/spool/cron/crontabs/root ];then
grep update_time.sh /var/spool/cron/crontabs/root &> /dev/null
if [ $? = 0 ];then
@@ -30,35 +14,9 @@ else
fi
grep cron /etc/cron/weekly/syslog > /dev/null
if [ $? = 0 ];then
sed -i '/cron/d' /etc/cron/weekly/syslog
fi
#d5000 cron example
cp d5000_cron_example.sh /opt/
#logrotate
cp logrotate.d/* /etc/logrotate.d/
chown -R audadmin.audadmin /etc/logrotate.d/
#cp syslog /etc/cron/weekly/
/bin/rm /etc/cron/weekly/syslog
mkdir -p /etc/cron/monthly
cp syslog /etc/cron/monthly
chown -R audadmin.audadmin /etc/cron/monthly
setfacl -m u:sysadmin:rwx /usr/sbin/rotatelog
#delete
del_exist ()
{
if [ -f /etc/cron/daily/$1 ];then
/bin/rm /etc/cron/daily/$1
fi
}
del_exist makewhatis
del_exist pwck
del_exist rdate
del_exist slocate
#ntp client
if [ -f /usr/sbin/update_time.sh ];then
chmod +x /usr/sbin/update_time.sh