From ba7667fc5002ffd0640404104527b1d5bc491978 Mon Sep 17 00:00:00 2001 From: Eric Thibodeau Date: Thu, 14 Aug 2008 00:33:00 -0400 Subject: Corrections and service restarts so that the name resolution is in a consistant state after modifying the system's config in that regards. --- .../livecd/2008.0/overlay/usr/sbin/cluster-setup | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/catalyst/livecd/2008.0/overlay/usr/sbin/cluster-setup b/catalyst/livecd/2008.0/overlay/usr/sbin/cluster-setup index 87b02ad..9675ad8 100755 --- a/catalyst/livecd/2008.0/overlay/usr/sbin/cluster-setup +++ b/catalyst/livecd/2008.0/overlay/usr/sbin/cluster-setup @@ -36,7 +36,7 @@ do_conf() { einfo "Calling $* " $* if [ $? != 0 ]; then - eerror "Call to $* did not returne 0 errors (there were some!)" + eerror "Call to $* did not return 0 errors." ewarn "Look above this message for clues." exit 1 fi @@ -53,6 +53,8 @@ einfo "Checking config files.." done } +####### Main ######### + # speed up the dev cycle by automating some tasks: if [[ "$1" == "--test" ]]; then ewarn @@ -90,19 +92,27 @@ if [[ "$CLUSTER_ETH" =~ eth.* && $1 != "--test" ]]; then done if [[ $ANS == "y" ]]; then net-setup $CLUSTER_ETH - einfo "Adding modules_${CLUSTER_ETH}=( \"!plug\" ) to /etc/conf.d/net (required for the system's consistency)" - echo "modules_${CLUSTER_ETH}=( \"!plug\" )" >> /etc/conf.d/net + einfo "Adding modules_$CLUSTER_ETH=( \"!plug\" ) to /etc/conf.d/net (required for the system's consistency)" + echo "modules_$CLUSTER_ETH=( \"!plug\" )" >> /etc/conf.d/net einfo "$CLUSTER_ETH will have to be restarted to be in a consistent state" /etc/init.d/net.$CLUSTER_ETH restart fi [[ $ANS == "n" ]] && einfo "You know what you're doing..." else einfo "CLUSTER_ETH is not set to an eth? device: $CLUSTER_ETH" - einfo "Hope you know what you're doing!" + einfo "Hope you know what you're doing." fi do_conf /etc/gentoo/cluster.conf "emerge --config =sys-cluster/beowulf-head-0.1" -einfo "Setting up auth on the $NFSROOT " +# we need to set master and master.$DOMAINNAME to a real IP address for everything to work: +echo "$(LC_ALL=C ifconfig "eth1" | sed -n -e 's#.*\(inet addr:\|inet \)\([^ ]*\).*#\2#p') $(hostname).$LOCALDOMAINNAME $(hostname)" >> /etc/hosts + +einfo "Setting up auth on the $NFSROOT" USE=-authmaster ROOT="$NFSROOT" emerge --config =net-nds/ldap-auth-0.1 +einfo "We need to refresh resolv.conf and dnsmasq." +einfo "Restarting both $PUBETH and dnsmasq..." +/etc/init.d/net.$PUBETH restart +/etc/init.d/dnsmasq restart + -- cgit v1.2.3-65-gdbad