首页 > 其他 > 详细

随笔

时间:2014-04-22 11:30:59      阅读:513      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
#!/bin/bash

tft_conf="/etc/xinetd.d/tftp"
backup_dir="/network/sw_backup"
if [ -d {backup_dir} ]
then
echo "$backup_dir has been exist! "
else
mkdir -pv $backup_dir
chmod -R 777 $backup_dir
fi
if [ -f ${tft_conf} ]
then
echo "The tftpserver has been exist!"
else
yum install tftp tftp-server -y
    if [ $? -eq 0 ]
    then 
        echo "tftserver install sucessful! "
    else
        echo "tftservr install faild !"
        echo "please check your env !"
    exit 1
    fi
fi

echo "config the tftpserver ......"

sed -i /disable/s/yes/no/g $tft_conf
sed -i /server_args/s#-s /tftpboot#-s /network/sw_backup -c#g $tft_conf

chkconfig tftp on
chkconfig xinetd on
/etc/init.d/xinetd restart
bubuko.com,布布扣

 

 

随笔,布布扣,bubuko.com

随笔

原文:http://www.cnblogs.com/osxlinux/p/3679611.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!