View | Details | Raw Unified | Return to bug 104549
Collapse All | Expand All

(-)nfsd.new (+38 lines)
Lines 44-47 Link Here
44
	return 0
44
	return 0
45
}
45
}
46
46
47
# Overwrite the _find_processes() function. We are only interested in the
48
# nfsd master process. Only this one should get the kill signal.
49
50
_find_processes()
51
{
52
	if [ $# -ne 3 ]; then
53
		err 3 'USAGE: _find_processes procname interpreter psargs'
54
	fi
55
	_procname=$1
56
	_interpreter=$2
57
	_psargs=$3
58
59
	_pref=
60
		_procnamebn=${_procname##*/}
61
		_fp_args='_arg0 _argv _x'
62
		_fp_match='case "$_arg0" in
63
		    $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")'
64
65
	_proccheck='
66
		ps 2>/dev/null -o "pid,jid,command" '"$_psargs"' |
67
		while read _npid _jid '"$_fp_args"'; do
68
			case "$_npid" in
69
			PID)
70
				continue;;
71
			esac; '"$_fp_match"'
72
				if [ "$_argv" = "master" -a "$JID" -eq "$_jid" ];
73
				then echo -n "$_pref$_npid";
74
				_pref=" ";
75
				fi
76
				;;
77
			esac
78
		done'
79
80
#	debug "in _find_processes: proccheck is ($_proccheck)."
81
	eval $_proccheck
82
}
83
84
47
run_rc_command "$1"
85
run_rc_command "$1"

Return to bug 104549