2012-12-04 18:57:37 +00:00
|
|
|
root=1
|
|
|
|
rootok=1
|
|
|
|
netroot=xcat
|
|
|
|
clear
|
|
|
|
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bashrc
|
|
|
|
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bash_profile
|
|
|
|
mkdir -p /etc/ssh
|
2014-04-29 18:59:23 +00:00
|
|
|
mkdir -p /var/tmp/
|
2012-12-04 18:57:37 +00:00
|
|
|
mkdir -p /var/empty/sshd
|
2015-03-17 03:36:10 +00:00
|
|
|
sed -i '/^root:x/d' /etc/passwd
|
2012-12-04 18:57:37 +00:00
|
|
|
echo root:x:0:0::/:/bin/bash >> /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
|
2013-08-22 08:04:33 +00:00
|
|
|
# Fedora 20 ppc64 uses /lib/dracut/hooks/initqueue/finished
|
|
|
|
# CentOS 7 probably uses /lib/dracut/hooks/initqueue/finished also
|
|
|
|
if [ -d "/initqueue-finished" ]; then
|
|
|
|
echo '[ -e $NEWROOT/proc ]' > /initqueue-finished/xcatroot.sh
|
|
|
|
else
|
|
|
|
#echo 'if [ -e /proc ]; then /bin/doxcat; fi' > /lib/dracut/hooks/initqueue/finished/xcatroot.sh
|
|
|
|
echo '[ -e /proc ]' > /lib/dracut/hooks/initqueue/finished/xcatroot.sh
|
|
|
|
fi
|
2012-12-04 18:57:37 +00:00
|
|
|
mkdir /dev/cgroup
|
|
|
|
mount -t cgroup -o cpu,memory,devices cgroup /dev/cgroup
|
2013-08-22 08:04:33 +00:00
|
|
|
# Fedora 20 ppc64 does not udevd
|
|
|
|
# CentOS 7 probably does not have udevd either
|
|
|
|
if [ -f "/sbin/udevd" ]; then
|
|
|
|
udevd --daemon
|
|
|
|
else
|
|
|
|
/usr/lib/systemd/systemd-udevd --daemon
|
|
|
|
fi
|
2012-12-04 18:57:37 +00:00
|
|
|
udevadm trigger
|
|
|
|
mkdir -p /var/lib/dhclient/
|
|
|
|
mkdir -p /var/log
|
|
|
|
ip link set lo up
|
|
|
|
echo '127.0.0.1 localhost' >> /etc/hosts
|
|
|
|
if grep console=ttyS /proc/cmdline > /dev/null; then
|
|
|
|
while :; do sleep 1; screen -x console < /dev/tty1 > /dev/tty1 2>&1; clear; done &
|
|
|
|
fi
|
|
|
|
while :; do screen -ln < /dev/tty2 > /dev/tty2 2>&1; done &
|
2014-09-05 09:10:54 +00:00
|
|
|
|
|
|
|
# The section below is just for System P LE hardware discovery
|
|
|
|
|
|
|
|
# Need to wait for NIC initialization
|
|
|
|
sleep 20
|
|
|
|
ARCH=`uname -m`
|
|
|
|
if [ $ARCH == 'ppc64' ]; then
|
|
|
|
|
|
|
|
ALL_NICS=`ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo`
|
|
|
|
for tmp in $ALL_NICS; do
|
|
|
|
tmp_data=`ip link show $tmp | grep -v "^ " | grep "UP"`
|
|
|
|
if [ "$tmp_data" == "" ]; then
|
|
|
|
ip link set $tmp up
|
|
|
|
fi
|
|
|
|
tmp_data="UP"
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2013-02-05 14:55:59 +00:00
|
|
|
while :; do screen -L -ln doxcat; done
|