Initramfs-tools/scripts/local-top/clustcontrol

From Rost Lab Open

clustcontrol

#!/bin/sh

PREREQ=""

prereqs()
{
     echo "$PREREQ"
}
case $1 in
prereqs)
     prereqs
     exit 0
     ;;
esac

# Begin real processing below this line
. /scripts/functions

# from /usr/share/initramfs-tools/scripts/nfs
	modprobe nfs
	# For DHCP
	modprobe af_packet

	wait_for_udev 10

log_begin_msg "Configuring networking"
	configure_networking
# Now we have in /tmp/net-eth0.conf:
# DEVICE=eth0; IPV4ADDR=192.168.0.2; IPV4BROADCAST=192.168.0.255;IPV4NETMASK=255.255.255.0;IPV4GATEWAY=192.168.0.1;IPV4DNS0;IPV4DNS1;HOSTNAME=n02.rostclust;DNSDOMAIN;NISDOMAIN(unset);filename="/cluster_node/pxelinux.0"
log_end_msg

log_begin_msg "Mounting standard root"
mkdir -p /tmp/rootstandard || panic "mkdir /tmp/rootstandard failed"
log_end_msg

if [ -n "$NFSROOT" ]; then
	if ( nfsmount -o nolock -o ro "${NFSROOT}" /tmp/rootstandard ); then
		. /tmp/rootstandard/etc/clustcontrol/functions;

		clustcontrol_top;
	fi;
fi;

exit 0