aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild')
-rw-r--r--overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild17
1 files changed, 13 insertions, 4 deletions
diff --git a/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild b/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild
index 1e23f3c..1e9961e 100644
--- a/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild
+++ b/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild
@@ -9,7 +9,7 @@ SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
-IUSE=""
+IUSE="autofs"
DEPEND=""
RDEPEND="net-nds/ldap-auth
@@ -32,6 +32,13 @@ get_ip_config()
IPSTOP="$(sipcalc ${CLUSTER_ETH} | egrep 'Usable range\W*-' | cut -d- -f3)"
SUBNET="$(sipcalc ${CLUSTER_ETH} | egrep 'Network mask\W*-' | cut -d- -f2)"
NETADDR="$(sipcalc ${CLUSTER_ETH} | egrep 'Network address' | cut -d- -f2)"
+ # We have to clean up the vars from spaces:
+ CLUSTER_ETH_IP=${CLUSTER_ETH_IP// }
+ RANGE_START=${RANGE_START// }
+ IPSTART=${IPSTART// }
+ IPSTOP=${IPSTOP// }
+ SUBNET=${SUBNET// }
+ NETADDR=${NETADDR// }
}
dnsmasq_conf()
@@ -129,13 +136,13 @@ nfs_root_conf()
for I in $ROEXPORTS
do
echo "${I} $NETADDR/$SUBNET(ro,$NFSEPORTOPTS)" >> ${ROOT}/etc/exportfs
- echo "${I/\/} -ro,$NFSMOUNTOPTS $CLUSTER_ETH_Ir:${I}" >> ${NFSROOT}/etc/autofs/auto.nfs
+ use autofs && echo "${I/\/} -ro,$NFSMOUNTOPTS $CLUSTER_ETH_Ir:${I}" >> ${NFSROOT}/etc/autofs/auto.nfs
done
for I in $RWEXPORTS
do
echo "${I} $NETADDR/$SUBNET(rw,$NFSEPORTOPTS)" >> ${ROOT}/etc/exportfs
- echo "${I/\/} -ro,$NFSMOUNTOPTS $CLUSTER_ETH_Ir:${I}" >> ${NFSROOT}/etc/autofs/auto.nfs
+ use autofs && echo "${I/\/} -ro,$NFSMOUNTOPTS $CLUSTER_ETH_Ir:${I}" >> ${NFSROOT}/etc/autofs/auto.nfs
done
}
@@ -150,6 +157,7 @@ pkg_setup() {
if ! built_with_use net-dns/dnsmasq tftp ; then
die "net-dns/dnsmasq must be built with USE=tftp to be used with ${P}!"
fi
+ use autofs && die "We're not there yet ;)"
}
src_install()
@@ -171,9 +179,10 @@ pkg_config()
pxe_conf
nfs_root_conf
- for I in dnsmasq netmount
+ for I in dnsmasq netmount nfs
do
rc-update add $I default
+ /etc/init.d/$I start
done
}