#!/bin/bash name="3:启用" service1=$(echo `chkconfig --list auditd`|sed 's:\s:/:g'|cut -d / -f 5) service2=$(echo `chkconfig --list autofs`|sed 's:\s:/:g'|cut -d / -f 5) if [ $name == $service1 ];then chkconfig --level 345 auditd off fi if [ $name == $service2 ];then chkconfig --level 345 autofs off fi (责任编辑:IT) |