cobbler 杂项

来源:互联网 发布:淘宝秒杀有关的句子 编辑:程序博客网 时间:2024/06/14 10:08
http://blog.oldboyedu.com/autoinstall-cobbler/

cobbler 更改PXE选择菜单选择
vim /etc/cobbler/pxe/pxedefault.template


#ks.cfg
RedHat官方中文文档
https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html#sect-kickstart-commands

expect自动交互
#!/bin/sh
expect <<!
spawn ssh xx@yyy
expect "*Password*"
send "xxx\r"
expect ">"
send "mkdir xxxxx\r"
send "exit\r"
expect eof
!
#遍历主机,调用脚本建立连接
for communication in `cat /tmp.out`; do

       /ping.sh $communication 1>/dev/null2>/dev/nvll
done

#执行自动互联脚本
expect <<!
set timeout 1
spawn ssh-copy-id -i /root/.ssh/id_rsa.pub $1
expect "*connecting*"
send "yes\r"
expect "*password*"
send "123.com\r"
expect eof
!