diff options
author | Michael Imhof <tantive@gentoo.org> | 2003-03-26 11:11:20 +0000 |
---|---|---|
committer | Michael Imhof <tantive@gentoo.org> | 2003-03-26 11:11:20 +0000 |
commit | 027515c9b95eab46d65eeda3870e6b6098eb8ef9 (patch) | |
tree | 21914af98511ec3196cc0719c342fea6dcea1da9 /sys-cluster | |
parent | nls fix0rs (diff) | |
download | gentoo-2-027515c9b95eab46d65eeda3870e6b6098eb8ef9.tar.gz gentoo-2-027515c9b95eab46d65eeda3870e6b6098eb8ef9.tar.bz2 gentoo-2-027515c9b95eab46d65eeda3870e6b6098eb8ef9.zip |
Version bumped to make sure everyone gets the new init script. Changed the name of the config file from /etc/mosix.map to /etc/openmosix.map. The
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/openmosix-user/ChangeLog | 10 | ||||
-rw-r--r-- | sys-cluster/openmosix-user/files/digest-openmosix-user-0.2.4-r5 | 1 | ||||
-rw-r--r-- | sys-cluster/openmosix-user/files/openmosix.init | 94 | ||||
-rw-r--r-- | sys-cluster/openmosix-user/openmosix-user-0.2.4-r5.ebuild | 102 |
4 files changed, 188 insertions, 19 deletions
diff --git a/sys-cluster/openmosix-user/ChangeLog b/sys-cluster/openmosix-user/ChangeLog index 866ff2f558ac..b3ecdd863e15 100644 --- a/sys-cluster/openmosix-user/ChangeLog +++ b/sys-cluster/openmosix-user/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-cluster/openmosix-user # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmosix-user/ChangeLog,v 1.5 2003/02/12 09:12:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmosix-user/ChangeLog,v 1.6 2003/03/26 11:11:20 tantive Exp $ + +* openmosix-user-0.2.4-r5 (26 Mar 2003) + + 26 Mar 2003; Michael Imhof <tantive@gentoo.org> + Version bumped to make sure everyone gets the new init script. + Changed the name of the config file from /etc/mosix.map to + /etc/openmosix.map. The ebuild will take care of moving old + config files or install a new if no old one is present. 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords diff --git a/sys-cluster/openmosix-user/files/digest-openmosix-user-0.2.4-r5 b/sys-cluster/openmosix-user/files/digest-openmosix-user-0.2.4-r5 new file mode 100644 index 000000000000..85f88e730ce3 --- /dev/null +++ b/sys-cluster/openmosix-user/files/digest-openmosix-user-0.2.4-r5 @@ -0,0 +1 @@ +MD5 2e4e630a391900b331323bffea5c5547 openMosixUserland-0.2.4.tgz 65494 diff --git a/sys-cluster/openmosix-user/files/openmosix.init b/sys-cluster/openmosix-user/files/openmosix.init index c12a883aee69..8e467654c0a8 100644 --- a/sys-cluster/openmosix-user/files/openmosix.init +++ b/sys-cluster/openmosix-user/files/openmosix.init @@ -1,4 +1,8 @@ #!/sbin/runscript +# +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmosix-user/files/openmosix.init,v 1.2 2003/03/26 11:11:20 tantive Exp $ depend() { need net @@ -6,28 +10,82 @@ depend() { stop() { ebegin "Stopping openMosix" + # Expel all processes and disable openMosix configuration + einfo "openMosix: " + mosctl expel setpe -off + killall -TERM omdiscd &> /dev/null rm -f /var/lock/subsys/mosix eend } start() { - ebegin "Starting openMosix" - if [ -s /etc/overheads -a -f /proc/mosix/admin/overheads ] - then - grep -v '^#' /etc/overheads > /proc/mosix/admin/overheads - fi - if [ -s /etc/mfscosts -a -f /proc/mosix/admin/mfscosts ] - then - grep -v '^#' /etc/mfscosts > /proc/mosix/admin/mfscosts - fi - local a1 - local a2 - a1= - [ -s /etc/mospe ] && a1="-p `cat /etc/mospe`" - a2= - [ -s /etc/mosgates ] && a2="-g `cat /etc/mosgates`" - setpe -W $a1 $a2 -f /etc/mosix.map - touch /var/lock/subsys/mosix - eend + +# If we're not running an openMosix enabeled kernel: exit +if [ ! -d /proc/hpc ]; then + einfo "This is not an openMosix kernel, configuration aborted" + exit +fi + +# Find the openMosix map-file +AUTODISC=0 +if [ -f /etc/openmosix.map ]; then + OMOSIX_MAP=/etc/openmosix.map +elif [ -f /etc/mosix.map ]; then + OMOSIX_MAP=/etc/mosix.map + einfo "openMosix map-file /etc/mosix.map depreciated: Rename to /etc/openmosix.map" +elif [ -f /etc/hpc.map ]; then + OMOSIX_MAP=/etc/hpc.map + einfo "openMosix map-file /etc/hpc.map depreciated: Rename to /etc/openmosix.map" +else + AUTODISC=1 +fi + +# Check the map-file for sanity +if [ $AUTODISC -eq 0 ]; then + setpe -c -f $OMOSIX_MAP &> /dev/null + if [ ! $? -eq 0 ]; then + einfo "openMosix: Invalid configuration in map-file $OMOSIX_MAP, using autodiscovery" + AUTODISC=1 + fi +fi + +# Source the configuration from /etc/openmosix.config +# This file would be a good place to force autodiscovery by setting AUTODISC=1 +[ -f /etc/openmosix.config ] && . /etc/openmosix.config + +# Make sure we have omdiscd installed +if [ $AUTODISC -eq 1 ]; then + if [ ! -x /sbin/omdiscd ]; then + eerror "openMosix: omdiscd not installed, exiting" + exit + fi +fi + + + + ebegin "Initializing openMosix" + # The variables $OVERHEADS, $MFSCOSTS, $MYOMID, $MOSGATES and $AUTODISCIF + # can be set to desired values in /etc/openmosix.config + [ $OVERHEADS ] && echo $OVERHEADS > /proc/hpc/admin/overheads + [ $MFSCOSTS ] && echo $MFSCOSTS > /proc/hpc/admin/mfscosts + + if [ $AUTODISC -eq 0 ]; then + # Static configuration via $OMOSIX_MAP + SETPE_OPTIONS="" + [ $MYOMID ] && $SETPE_OPTIONS="$SETPE_OPTIONS -p $MYOMID" + [ $MOSGATES ] && $SETPE_OPTIONS="$SETPE_OPTIONS -g $MOSGATES" + setpe -W $SETPE_OPTIONS -f $OMOSIX_MAP + else + # Configurate openMosix with the omdiscd + OMDISCD_OPTIONS="" + [ $AUTODISCIF ] && $OMDISCD_OPTIONS="$OMDISCD_OPTIONS -i $AUTODISCIF" + omdiscd $OMDISCD_OPTIONS + fi + + [ $? -eq 0 ] && touch /var/lock/subsys/openmosix + mosctl noblock 1>/dev/null 2>&1 + eend } + + diff --git a/sys-cluster/openmosix-user/openmosix-user-0.2.4-r5.ebuild b/sys-cluster/openmosix-user/openmosix-user-0.2.4-r5.ebuild new file mode 100644 index 000000000000..e7b211a710ef --- /dev/null +++ b/sys-cluster/openmosix-user/openmosix-user-0.2.4-r5.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmosix-user/openmosix-user-0.2.4-r5.ebuild,v 1.1 2003/03/26 11:11:20 tantive Exp $ + +S=${WORKDIR}/openMosixUserland-${PV} +DESCRIPTION="User-land utilities for openMosix process migration (clustering) software" +SRC_URI="mirror://sourceforge/openmosix/openMosixUserland-${PV}.tgz" +HOMEPAGE="http://www.openmosix.com/" +DEPEND="virtual/glibc + >=sys-libs/ncurses-5.2 + >=sys-kernel/openmosix-sources-2.4.18" +RDEPEND="${DEPEND} + sys-apps/findutils + dev-lang/perl" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 -ppc -sparc -alpha" + +pkg_setup() { + if [ -z "`readlink /usr/src/linux|grep openmosix`" ]; then + eerror + eerror "Your linux kernel sources do not appear to be openmosix," + eerror "please check your /usr/src/linux symlink." + eerror + die + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + cat Makefile | sed s/DIRS.*=/DIRS=autodiscovery/g > Makefile.tmp + mv Makefile.tmp Makefile + cat > configuration << EOF + +OPENMOSIX=/usr/src/linux +PROCDIR=/proc/hpc +MONNAME=mmon +CC=gcc +INSTALLDIR=/usr +CFLAGS=-I/m/include -I./ -I/usr/include -I\$(OPENMOSIX)/include ${CFLAGS} +INSTALL=/usr/bin/install +EOF + +#autodiscovery seems to be in non-alpha-mode by default now +#non-alpha-mode for autodiscovery (omdiscd) +#cd ${S}/autodiscovery +#cat openmosix.c | grep -v "define ALPHA" > openmosix.c.tmp +#mv openmosix.c.tmp openmosix.c +#cat showmap.c | grep -v "define ALPHA" > showmap.c.tmp +#mv showmap.c.tmp showmap.c +} + +src_compile() { + cd ${S} + make clean build +} + +src_install() { + dodir /usr/lib + dodir /usr/sbin + dodir /usr/include + dodir /usr/share/include + dodir /usr/bin + dodir /bin + ln -s /usr/bin/migrate ${D}/bin/migrate + ln -s /usr/bin/mmon ${D}/bin/mmon + ln -s /usr/bin/mosctl ${D}/bin/mosctl + ln -s /usr/bin/mosrun ${D}/bin/mosrun + dodir /usr/share/man/man1 + make INSTALLBASEDIR=${D}usr \ + INSTALLMANDIR=${D}usr/share/man \ + INSTALLEXTRADIR=${D}usr/share \ + DESTDIR=${D} \ + INSTALLDIR=${D}usr \ + install + + dodoc COPYING README + exeinto /etc/init.d + newexe ${FILESDIR}/openmosix.init openmosix + insinto /etc + #Test if mosix.map is present, stub appropriate openmosix.map + #file + if test -e /etc/openmosix.map; then + einfo "Seems you already have a openmosix.map file, using it."; + elif test -e /etc/mosix.map; then + mv /etc/mosix.map ${WORKDIR}/openmosix.map; + doins ${WORKDIR}/openmosix.map; + else + doins ${FILESDIR}/openmosix.map; + fi +} + +pkg_postinst() { + einfo + einfo " To complete openMosix installation, edit /etc/openmosix.map and then type:" + einfo " # rc-update add openmosix default" + einfo " ...to add openMosix to the default runlevel. This particular version of" + einfo " openmosix-user has been designed to work with the linux-2.4.18-openmosix-r1" + einfo " or later kernel (>=sys-kernel/openmosix-sources-2.4.18)" + einfo +} |