diff --git a/xCAT-server/share/xcat/postscripts/enablesysreq b/xCAT-server/share/xcat/postscripts/enablesysreq deleted file mode 100755 index d2e992df3..000000000 --- a/xCAT-server/share/xcat/postscripts/enablesysreq +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/ksh -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -#egan@us.ibm.com -#(C)IBM Corp - -case "$OSVER" in - sles*|suse*|ul*) - perl -pi -e 's/^ENABLE_SYSRQ.*/ENABLE_SYSRQ="yes"/' /etc/sysconfig/sysctl - ;; - rh*) - if egrep "^kernel\.sysrq" /etc/sysctl.conf >/dev/null 2>&1 - then - perl -pi -e 's/^kernel\.sysrq.*/kernel.sysrq = 1/' /etc/sysctl.conf - else - echo "kernel.sysrq = 1" >>/etc/sysctl.conf - fi - ;; -esac - diff --git a/xCAT-server/share/xcat/postscripts/hardeths b/xCAT-server/share/xcat/postscripts/hardeths deleted file mode 100644 index 21a50c382..000000000 --- a/xCAT-server/share/xcat/postscripts/hardeths +++ /dev/null @@ -1,26 +0,0 @@ -if [ -f /etc/SuSE-release ] -then - #SLES9 and SLES10, uses /etc/sysconfig/network/ifcfg-eth-id- - #SLES11, uses /etc/sysconfig/network/ifcfg-eth - NICFILEPRE="/etc/sysconfig/network/ifcfg-" - echo `hostname` > /etc/HOSTNAME -else - #RedHat uses /etc/sysconfig/network-scripts/ifcfg-eth - NICFILEPRE="/etc/sysconfig/network-scripts/ifcfg-" - sed -i "s/HOSTNAME.*/HOSTNAME=`hostname`/" /etc/sysconfig/network -fi -for nic in `ifconfig -a|grep -B1 "inet addr"|awk '{print $1}'|grep -v inet|grep -v -- --|grep -v lo`; do - IPADDR=`ifconfig $nic |grep "inet addr"|awk '{print $2}' |awk -F: '{print $2}'` - NETMASK=`ifconfig $nic |grep "inet addr"|awk '{print $4}' |awk -F: '{print $2}'` - if [ -f ${NICFILEPRE}${nic} ] - then - NICFILE=${NICFILEPRE}${nic} - else - mac=`ifconfig $nic|grep HWaddr|awk '{print $5}'|tr "[A-Z]" "[a-z]"` - NICFILE=${NICFILEPRE}eth-id-${mac} - fi - sed -i s/BOOTPROTO=dhcp/BOOTPROTO=static/ $NICFILE - sed -i s/BOOTPROTO=\'dhcp\'/BOOTPROTO=static/ $NICFILE - echo IPADDR=$IPADDR >> $NICFILE - echo NETMASK=$NETMASK >> $NICFILE -done diff --git a/xCAT-server/share/xcat/postscripts/reboot b/xCAT-server/share/xcat/postscripts/reboot deleted file mode 100755 index a2966c12d..000000000 --- a/xCAT-server/share/xcat/postscripts/reboot +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -#egan@us.ibm.com -#(C)IBM Corp -# - -(sleep 75;/sbin/reboot) & - -exit 0 - diff --git a/xCAT-server/share/xcat/postscripts/remoteshell b/xCAT-server/share/xcat/postscripts/remoteshell deleted file mode 100755 index 28139a3c2..000000000 --- a/xCAT-server/share/xcat/postscripts/remoteshell +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -#egan@us.ibm.com -#(C)IBM Corp -# - -if [ -r /etc/ssh/sshd_config ] -then - logger -t xcat "Install: setup /etc/ssh/sshd_config" - cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG - perl -pi -e 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config - perl -pi -e 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config - perl -pi -e 's/(.*MaxStartups.*)/#\1/' /etc/ssh/sshd_config - echo "MaxStartups 1024" >>/etc/ssh/sshd_config - echo "PasswordAuthentication no" >>/etc/ssh/sshd_config -fi - -if [ -d /xcatpost/.ssh ] -then - logger -t xcat "Install: setup root .ssh" - cd /xcatpost/.ssh - mkdir -p /root/.ssh - cp -f * /root/.ssh - chmod 700 /root/.ssh - chmod 600 /root/.ssh/* -fi - - -exit 0 - diff --git a/xCAT-server/share/xcat/postscripts/resyslog b/xCAT-server/share/xcat/postscripts/resyslog deleted file mode 100755 index 8b1c3e47f..000000000 --- a/xCAT-server/share/xcat/postscripts/resyslog +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/ksh -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -#egan@us.ibm.com -#(C)IBM Corp -# - - -echo "*.* @$(getent hosts $MASTER | awk '{print $1}')" >/etc/syslog.conf - -exit 0 - diff --git a/xCAT-server/share/xcat/postscripts/serialconsole b/xCAT-server/share/xcat/postscripts/serialconsole deleted file mode 100755 index 7640f6d7e..000000000 --- a/xCAT-server/share/xcat/postscripts/serialconsole +++ /dev/null @@ -1,23 +0,0 @@ -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -GRUB="" -for i in /boot/grub/grub.conf /boot/grub/menu.lst -do - if [ -r "$i" ] - then - logger -t xcat "Install: got GRUB at $i" - GRUB=$i - GRUBDIR=$(dirname $GRUB) - GRUBFILE=$(basename $GRUB) - break - fi -done - -if [ -n "$GRUB" ] -then - cd $GRUBDIR - perl -pi -e 's/^gfxmenu/#gfxmenu/' $GRUBFILE - perl -pi -e 's/^color/#color/' $GRUBFILE - perl -pi -e 's/^serial/#serial/' $GRUBFILE - perl -pi -e 's/^terminal/#terminal/' $GRUBFILE - perl -pi -e 's/quiet//g' $GRUBFILE -fi diff --git a/xCAT-server/share/xcat/postscripts/syslog b/xCAT-server/share/xcat/postscripts/syslog deleted file mode 100755 index e291a5f3c..000000000 --- a/xCAT-server/share/xcat/postscripts/syslog +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/ksh -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html -#egan@us.ibm.com -#(C)IBM Corp -# - -HARD_SYSLOG=$1 - -if [ -n "$HARD_SYSLOG" ] -then - MASTER=$HARD_SYSLOG -fi - -mv -f /etc/syslog.conf /etc/syslog.conf.ORIG -echo "*.* @$(getent hosts $MASTER | awk '{print $1}')" >/etc/syslog.conf - -case $OSVER in - sles[89]|suse8*|suse9*|suse10|ul*) - if grep 'SYSLOGD_PARAMS="-m0' /etc/sysconfig/syslog >/dev/null 2>&1 - then - : - else - perl -pi -e 's/SYSLOGD_PARAMS="/SYSLOGD_PARAMS="-m0 /' /etc/sysconfig/syslog - fi - /etc/init.d/syslog restart - ;; - rh*) - /etc/rc.d/init.d/syslog start - ;; - sles10) - echo 'destination loghost { udp("10.64.0.1" port(514)); };' >> /etc/syslog-ng/syslog-ng.conf - echo 'log { source(src); destination(loghost); };' >> /etc/syslog-ng/syslog-ng.conf - /etc/init.d/syslog restart - ;; -esac - -logger -t xcat "Install: syslog setup" - -exit 0 - diff --git a/xCAT-server/share/xcat/postscripts/updateflag.awk b/xCAT-server/share/xcat/postscripts/updateflag.awk deleted file mode 100755 index 84135042e..000000000 --- a/xCAT-server/share/xcat/postscripts/updateflag.awk +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/awk -f -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html - -BEGIN { - xcatdhost = ARGV[1] - xcatdport = 3002 - - - ns = "/inet/tcp/0/" ARGV[1] "/" xcatdport - - while(1) { - if((ns |& getline) > 0) - print $0 | "logger -t xcat" - else { - print "Retrying flag update" | "logger -t xcat" - close(ns) - system("sleep 10") - } - - if($0 == "ready") - print "next" |& ns - if($0 == "done") - break - } - - close(ns) - - exit 0 -} -