summaryrefslogtreecommitdiff
blob: a8a8ce644d1e4b2bc3b6e9c431a72667af4941b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/sbin/runscript

depend() {
	need net
}

stop() {
	ebegin "Stopping openMosix"
	echo 0 > /proc/mosix/admin/mospe
	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
}