Further flesh out nbroot2, obey DHCP directed logging configuration
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10185 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b43617b2cd
commit
6b33dc2259
@ -25,6 +25,14 @@ elif [ $reason = "BOUND" ]; then
|
||||
for gw in $new_routers; do
|
||||
ip route add default via $gw
|
||||
done
|
||||
if [ ! -z "$new_log_servers" ]; do
|
||||
head -n -1 /etc/rsyslog.conf > /etc/rsyslog.conf.new
|
||||
cp /etc/rsyslog.conf.new /etc/rsyslog.conf
|
||||
done
|
||||
for ls in $new_log_servers; do
|
||||
echo *.* @$ls >> /etc/rsyslog.conf
|
||||
done
|
||||
|
||||
if [ ! -z "$new_tcode" -a -r "/usr/share/zoneinfo/posix/$new_tcode" ]; then
|
||||
cp "/usr/share/zoneinfo/posix/$new_tcode" /etc/localtime
|
||||
rm -rf /usr/share/zoneinfo #free up ramdisk
|
||||
|
2
xCAT-nbroot2/dhclient.conf
Normal file
2
xCAT-nbroot2/dhclient.conf
Normal file
@ -0,0 +1,2 @@
|
||||
option tcode code 101 = text;
|
||||
request subnet-mask, routers, domain-name, domain-search, domain-name-servers, host-name, ntp-servers, interface-mtu, tcode, log-servers;
|
@ -4,7 +4,7 @@ minixcatd.awk &
|
||||
echo "Beginning node discovery process"
|
||||
NICSTOBRINGUP=`ip link|grep mtu|grep -v LOOPBACK|grep -v usb|grep -v ,UP|awk -F: '{print $2}'`
|
||||
for nic in $NICSTOBRINGUP; do
|
||||
dhclient -pf /var/run/dhclient.$nic.pid $nic &
|
||||
dhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$nic.pid $nic &
|
||||
#no need to go out of our way for superfluous ipv6 nics
|
||||
done
|
||||
waitforlink=100
|
||||
|
@ -6,7 +6,7 @@ dracut_install mount.nfs sshd vi reboot lspci parted libvirtd /usr/share/libvirt
|
||||
dracut_install mkswap df brctl vconfig ifenslave ssh-keygen /usr/bin/qemu-img /usr/libexec/qemu-kvm scp clear dhclient lldpad
|
||||
dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
|
||||
dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /etc/nsswitch.conf /etc/services
|
||||
dracut_install /sbin/rsyslogd
|
||||
dracut_install /sbin/rsyslogd /etc/protocols umount
|
||||
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/head /etc/redhat-release ping tr lsusb #ibm fw wrapper requirements
|
||||
dracut_install /usr/share/zoneinfo/posix/Zulu
|
||||
dracut_install /usr/share/zoneinfo/posix/GMT-0
|
||||
@ -586,9 +586,33 @@ 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.conf" "/etc/dhclient.conf"
|
||||
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf"
|
||||
dracut_install /sbin/rpc.statd /usr/sbin/sm-notify /etc/netconfig rpcbind /etc/host.conf /usr/sbin/rpc.idmapd
|
||||
dracut_install ps free find #debug
|
||||
inst_dir /var/lib/nfs
|
||||
inst_dir /var/lib/nfs/statd/sm
|
||||
inst_dir /var/lib/nfs/statd/sm.bak
|
||||
inst_dir /var/lib/nfs/rpc_pipefs/nfs
|
||||
inst "/bin/bash" "/bin/sh"
|
||||
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"
|
||||
dracut_install /lib64/rsyslog/lmtcpclt.so
|
||||
dracut_install /lib64/rsyslog/omtesting.so
|
||||
dracut_install /lib64/rsyslog/lmnetstrms.so
|
||||
dracut_install /lib64/rsyslog/imfile.so
|
||||
dracut_install /lib64/rsyslog/imklog.so
|
||||
dracut_install /lib64/rsyslog/lmzlibw.so
|
||||
dracut_install /lib64/rsyslog/immark.so
|
||||
dracut_install /lib64/rsyslog/imudp.so
|
||||
dracut_install /lib64/rsyslog/lmregexp.so
|
||||
dracut_install /lib64/rsyslog/lmtcpsrv.so
|
||||
dracut_install /lib64/rsyslog/lmnsd_ptcp.so
|
||||
dracut_install /lib64/rsyslog/imtcp.so
|
||||
dracut_install /lib64/rsyslog/lmnet.so
|
||||
dracut_install /lib64/rsyslog/lmstrmsrv.so
|
||||
dracut_install /lib64/rsyslog/imuxsock.so
|
||||
dracut_install /usr/lib64/libnfsidmap/nsswitch.so
|
||||
|
5
xCAT-nbroot2/rsyslog.conf
Normal file
5
xCAT-nbroot2/rsyslog.conf
Normal file
@ -0,0 +1,5 @@
|
||||
$ModLoad imuxsock
|
||||
$ModLoad immark
|
||||
$MarkMessagePeriod 1200
|
||||
*.emerg *
|
||||
*.* ~
|
@ -3,6 +3,8 @@ rootok=1
|
||||
netroot=xcat
|
||||
clear
|
||||
echo '[ -e $NEWROOT/proc ]' > /initqueue-finished/xcatroot.sh
|
||||
mkdir /dev/cgroup
|
||||
mount -t cgroup -o cpu,memory,devices cgroup /dev/cgroup
|
||||
udevd --daemon
|
||||
udevadm trigger
|
||||
mkdir -p /var/lib/dhclient/
|
||||
@ -43,11 +45,16 @@ mkdir -p /etc/ssh
|
||||
mkdir -p /var/empty/sshd
|
||||
echo root:x:0:0::/:/bin/sh >> /etc/passwd
|
||||
echo sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin >> /etc/passwd
|
||||
echo rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin >> /etc/passwd
|
||||
echo rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin >> /etc/passwd
|
||||
echo qemu:x:107:107:qemu user:/:/sbin/nologin >> /etc/passwd
|
||||
rpcbind
|
||||
rpc.statd
|
||||
ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N ''
|
||||
ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N ''
|
||||
echo 'Protocol 2' >> /etc/ssh/sshd_config
|
||||
/usr/sbin/sshd
|
||||
dhclient -pf /var/run/dhclient.$bootnic.pid $bootnic &
|
||||
dhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$bootnic.pid $bootnic &
|
||||
dhclient -6 -pf /var/run/dhclient6.$bootnic.pid $bootnic -lf /var/lib/dhclient/dhclient6.leases &
|
||||
mkdir -p /etc/xcat
|
||||
mkdir -p /etc/pki/tls
|
||||
|
Loading…
Reference in New Issue
Block a user