aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Thibodeau <kyron@neuralbs.com>2008-08-14 00:33:00 -0400
committerEric Thibodeau <kyron@neuralbs.com>2008-08-14 00:33:00 -0400
commitba7667fc5002ffd0640404104527b1d5bc491978 (patch)
treefabf7f7049bd77357e4de7e0c1c6e2e8921be254
parentReverted to using a sercer name and not a hardcoded 'rootserver' as LDAP server (diff)
downloadclustering-livecd-ba7667fc5002ffd0640404104527b1d5bc491978.tar.gz
clustering-livecd-ba7667fc5002ffd0640404104527b1d5bc491978.tar.bz2
clustering-livecd-ba7667fc5002ffd0640404104527b1d5bc491978.zip
Corrections and service restarts so that the name resolution is in a consistant state after modifying the system's config in that regards.
-rwxr-xr-xcatalyst/livecd/2008.0/overlay/usr/sbin/cluster-setup20
1 files 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
+