diff --git a/xCAT-nbroot2/install b/xCAT-nbroot2/install index b63b1cfaf..bcc9ea916 100755 --- a/xCAT-nbroot2/install +++ b/xCAT-nbroot2/install @@ -4,12 +4,15 @@ dracut_install wget openssl tar ipmitool cpio gzip dash modprobe touch echo cut dracut_install grep ip hostname awk egrep grep dirname expr dracut_install mount.nfs sshd vi reboot lspci parted libvirtd /usr/share/libvirt/cpu_map.xml mkfs mkfs.ext4 mkfs.btrfs dracut_install mkswap df brctl vconfig ifenslave ssh-keygen /usr/bin/qemu-img /usr/libexec/qemu-kvm scp clear dhclient lldpad -dracut_install lldptool +dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2 dracut_install poweroff inst "$moddir/xcatroot" "/sbin/xcatroot" inst "$moddir/dodiscovery" "/bin/dodiscovery" inst "$moddir/udpcat.awk" "/bin/udpcat.awk" +inst "$moddir/minixcatd.awk" "/bin/minixcatd.awk" +inst "$moddir/bmcsetup" "/bin/bmcsetup" inst "$moddir/dhclient-script" "/sbin/dhclient-script" +inst "/lib64/libnss_dns-2.12.so" inst "/root/.ssh/id_rsa.pub" "/.ssh/authorized_keys" inst "/lib/terminfo/l/linux" "/lib/terminfo/l/linux" inst_hook cmdline 10 "$moddir/xcat-cmdline.sh" diff --git a/xCAT-nbroot2/minixcatd.awk b/xCAT-nbroot2/minixcatd.awk new file mode 100755 index 000000000..ef0352ded --- /dev/null +++ b/xCAT-nbroot2/minixcatd.awk @@ -0,0 +1,19 @@ +#!/usr/bin/awk -f +# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +BEGIN { + port = 3001 + listener = "/inet/tcp/" port "/0/0" + quit = "no" + while (match(quit,"no")) { + while (match(quit,"no") && (listener |& getline) > 0) { + if (match($0,"restart")) { + print "restarting bootstrap process" |& listener + quit="yes" + system("echo \"" $0 "\" > /restart") + system("killall sleep") + close(listener) + } + } + close(listener) + } +} diff --git a/xCAT-nbroot2/xcat-cmdline.sh b/xCAT-nbroot2/xcat-cmdline.sh index 6409f31b3..8e53f163f 100755 --- a/xCAT-nbroot2/xcat-cmdline.sh +++ b/xCAT-nbroot2/xcat-cmdline.sh @@ -63,6 +63,7 @@ echo "{" >> /var/lib/lldpad/lldpad.conf echo "tlvid00000006 :" >> /var/lib/lldpad/lldpad.conf echo "{" >> /var/lib/lldpad/lldpad.conf echo info = '"'$PUBKEY'";' >> /var/lib/lldpad/lldpad.conf + echo enableTx = true; >> /var/lib/lldpad/lldpad.conf echo '};' >> /var/lib/lldpad/lldpad.conf echo 'adminStatus = 3;' >> /var/lib/lldpad/lldpad.conf echo '};' >> /var/lib/lldpad/lldpad.conf