summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/openmosix-user/files/openmosix.init')
-rw-r--r--sys-cluster/openmosix-user/files/openmosix.init97
1 files changed, 0 insertions, 97 deletions
diff --git a/sys-cluster/openmosix-user/files/openmosix.init b/sys-cluster/openmosix-user/files/openmosix.init
deleted file mode 100644
index 494744ad05e1..000000000000
--- a/sys-cluster/openmosix-user/files/openmosix.init
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/sbin/runscript
-#
-# Copyright 1999-2004 Gentoo Foundation
-# 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.8 2004/07/15 00:55:46 agriffis Exp $
-
-depend() {
- need net
-}
-
-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() {
-
-# 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
-
-OMnode=""
-if [ -f /etc/openmosix/om-node-num ]
-then
- OMnode="-p $(< /etc/openmosix/om-node-num)"
-fi
-
-# Check the map-file for sanity
-if [ $AUTODISC -eq 0 ]; then
- setpe $OMnode -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/openmosix.config
-# This file would be a good place to force autodiscovery by setting AUTODISC=1
-[ -f /etc/openmosix/openmosix.config ] && . /etc/openmosix/openmosix.config
-
-# Make sure we have omdiscd installed
-if [ $AUTODISC -eq 1 ]; then
- if [ ! -x `which omdiscd` ]; then
- eerror "openMosix: omdiscd not installed, exiting"
- eend
- fi
-fi
-
-
-
- ebegin "Initializing openMosix"
- # The variables $OVERHEADS, $MFSCOSTS, $MYOMID, $MOSGATES and $AUTODISCIF
- # can be set to desired values in /etc/openmosix/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 $OMnode -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
-}
-
-