summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-11-24 16:46:07 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-11-24 16:46:07 +0000
commit0e3431be8bd468a54dbc2d023ca8e49911f046e4 (patch)
treeaf05cd2d4091be438ad1ad94ad559048afadc791 /sys-apps
parentnew version (diff)
downloadgentoo-2-0e3431be8bd468a54dbc2d023ca8e49911f046e4.tar.gz
gentoo-2-0e3431be8bd468a54dbc2d023ca8e49911f046e4.tar.bz2
gentoo-2-0e3431be8bd468a54dbc2d023ca8e49911f046e4.zip
mosix user utilities updated for 1.0_rc6 and kernel 2.2.13
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/mosix-user/files/mosix.init34
-rwxr-xr-xsys-apps/mosix-user/files/mosix.init-1.0.5118
-rw-r--r--sys-apps/mosix-user/files/mosix.map10
-rw-r--r--sys-apps/mosix-user/mosix-user-1.5.2.ebuild7
4 files changed, 49 insertions, 120 deletions
diff --git a/sys-apps/mosix-user/files/mosix.init b/sys-apps/mosix-user/files/mosix.init
new file mode 100644
index 000000000000..b52330a3fb2c
--- /dev/null
+++ b/sys-apps/mosix-user/files/mosix.init
@@ -0,0 +1,34 @@
+#!/bin/runscript
+
+depend() {
+ need net
+}
+
+stop() {
+ ebegin "Stopping MOSIX"
+ echo 0 > /proc/mosix/admin/mospe
+ rm -f /var/lock/subsys/mosix
+ eend
+}
+
+start() {
+ ebegin "Starting MOSIX"
+ #do some first-time setup if MOSIX isn't configured
+ [ ! -f /etc/mosix.map ] && firstsetup
+
+ if [ -s /etc/overheads -a -f /proc/mosix/admin/overheads ]
+ then
+ /bin/grep -v '^#' /etc/overheads > /proc/mosix/admin/overheads
+ fi
+ if [ -s /etc/mfscosts -a -f /proc/mosix/admin/mfscosts ]
+ then
+ /bin/grep -v '^#' /etc/mfscosts > /proc/mosix/admin/mfscosts
+ fi
+ a1=
+ [ -s /etc/mospe ] && a1="-p `cat /etc/mospe`"
+ a2=
+ [ -s /etc/mosgates ] && a2="-g `cat /etc/mosgates`"
+ /sbin/setpe -W $a1 $a2 -f /etc/mosix.map
+ touch /var/lock/subsys/mosix
+ eend
+}
diff --git a/sys-apps/mosix-user/files/mosix.init-1.0.5 b/sys-apps/mosix-user/files/mosix.init-1.0.5
deleted file mode 100755
index f339dabb666e..000000000000
--- a/sys-apps/mosix-user/files/mosix.init-1.0.5
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh -
-#RCUPDATE:2 3 4:95:This line is required for script management
-
-# description: MOSIX is am extension of the operating system,
-# supporting scalable and transparent cluster computing.
-#
-# mosix Script to stop/start MOSIX
-#
-# Author: Amnon Shiloh
-
-. /etc/rc.d/config/functions
-
-SERVICE="mosix"
-opts="start stop status restart"
-
-mosix_stop() {
- echo 0 > /proc/mosix/admin/mospe
- rm -f /var/lock/subsys/mosix
-}
-
-mosix_start() {
- if [ -s /etc/overheads -a -f /proc/mosix/admin/overheads ]
- then
- /bin/grep -v '^#' /etc/overheads > /proc/mosix/admin/overheads
- fi
- if [ -s /etc/mfscosts -a -f /proc/mosix/admin/mfscosts ]
- then
- /bin/grep -v '^#' /etc/mfscosts > /proc/mosix/admin/mfscosts
- fi
- a1=
- [ -s /etc/mospe ] && a1="-p `cat /etc/mospe`"
- a2=
- [ -s /etc/mosgates ] && a2="-g `cat /etc/mosgates`"
- /sbin/setpe -W $a1 $a2 -f /etc/mosix.map
- touch /var/lock/subsys/mosix
-}
-
-alarm() {
- t=$2
- while :
- do
- case "$t" in 0) break ;; esac
- sleep 1
- t=$(($t-1))
- done
- kill -1 $1
- exit 0
-}
-
-# See how we were called.
-start() {
- eecho "Initializing MOSIX"
- if [ ! -f /etc/mosix.map ]
- then
- echo You have no MOSIX configuration - please edit yours now:
- echo -n "Editor to use [q to quit] - [vi] :- "
- trap 'echo Timed-Out ; exit 1' 1
- alarm $$ 120 &
- killer=$!
- read editor
- kill $killer
- trap ''
- case "$editor" in [qQ]) exit ;;
- "") editor=/usr/bin/vi
- [ -f $editor ] || editor=/bin/vi
- ;;
- esac
- echo "# MOSIX CONFIGURATION" > /etc/mosix.map
- echo "# ===================" >> /etc/mosix.map
- echo "#" >> /etc/mosix.map
- echo "# Each line should contain 3 fields, mapping IP addresses to MOSIX node-numbers:" >> /etc/mosix.map
- echo "# 1) first MOSIX node-number in range." >> /etc/mosix.map
- echo "# 2) IP address of the above node (or node-name from /etc/hosts)." >> /etc/mosix.map
- echo "# 3) number of nodes in this range." >> /etc/mosix.map
- echo "#" >> /etc/mosix.map
- echo "# MOSIX-# IP number-of-nodes" >> /etc/mosix.map
- echo "# ============================" >> /etc/mosix.map
- $editor /etc/mosix.map
- echo
- while :
- do
- echo "If this node's standard IP address is not part of the table that"
- echo "you just edited, because MOSIX uses a different or separate network,"
- echo "you need to type this node's MOSIX-number now."
- echo
- /bin/echo -n "Otherwise please press only <Enter> :- "
- read me
- case "$me" in "") /bin/rm -f /etc/mospe ; break ;;
- [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | \
- [1-9][0-9][0-9][0-9] | \
- [1-6][0-9][0-9][0-9][0-9])
- echo $me > /etc/mospe ; break ;;
- *) echo Improper MOSIX number - please try again: ;;
- esac
- done
- fi
- start_mosix
- eend
-}
-
-stop() {
- eecho "Stopping MOSIX"
- stop_mosix
- eend
-}
-
-status() {
- /sbin/setpe -r
-}
-
-restart() {
- eecho "Restarting MOSIX"
- stop_mosix
- start_mosix
- eend
-}
-
-doservice ${@}
diff --git a/sys-apps/mosix-user/files/mosix.map b/sys-apps/mosix-user/files/mosix.map
new file mode 100644
index 000000000000..5d1dd071479a
--- /dev/null
+++ b/sys-apps/mosix-user/files/mosix.map
@@ -0,0 +1,10 @@
+# Maintainer: Daniel Robbins <drobbins@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mosix-user/files/mosix.map,v 1.1 2001/11/24 16:46:07 drobbins Exp $
+
+# Each line should contain 3 fields, mapping IP addresses to MOSIX node-numbers:
+# 1) first MOSIX node-number in range.
+# 2) IP address of the above node (or node-name from /etc/hosts).
+# 3) number of nodes in this range.
+#
+
+# MOSIX number IP number of nodes
diff --git a/sys-apps/mosix-user/mosix-user-1.5.2.ebuild b/sys-apps/mosix-user/mosix-user-1.5.2.ebuild
index 57a01edf20b3..467b153579c9 100644
--- a/sys-apps/mosix-user/mosix-user-1.5.2.ebuild
+++ b/sys-apps/mosix-user/mosix-user-1.5.2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/mosix-user/mosix-user-1.5.2.ebuild,v 1.1 2001/11/24 02:13:37 drobbins Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mosix-user/mosix-user-1.5.2.ebuild,v 1.2 2001/11/24 16:46:04 drobbins Exp $
S=${WORKDIR}/user
DESCRIPTION="User-land utilities for MOSIX process migration (clustering) software"
@@ -69,8 +69,11 @@ src_install () {
dobin mosctl
doman mosctl.1
- exeinto /etc/rc.d/init.d
+ exeinto /etc/init.d
newexe ${FILESDIR}/mosix.init-${PV} mosix
+ insinto /etc
+ #stub mosix.map file
+ doins ${FILESDIR}/mosix.map
cd ${S}
doman man?/*
}