diff options
| author | William Hubbs <w.d.hubbs@gmail.com> | 2016-09-16 14:23:09 -0500 | 
|---|---|---|
| committer | William Hubbs <w.d.hubbs@gmail.com> | 2016-09-16 14:23:09 -0500 | 
| commit | c146b966913ae80652e3be925d3aba60ed82f14d (patch) | |
| tree | 94d07b0c33aa77f9e47ff8e9eeb93d87e0e73750 /sh | |
| parent | 6cabaf274defa11773094a2c85b3d0a9f0bd9b08 (diff) | |
| download | openrc-c146b966913ae80652e3be925d3aba60ed82f14d.tar.xz | |
Add command_progress variable
If this is set to yes, 1, true, or on, start-stop-daemon will display a
progress meter while waiting for a daemon to stop.
Diffstat (limited to 'sh')
| -rw-r--r-- | sh/start-stop-daemon.sh | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh index 6b679ac2..6f396b3b 100644 --- a/sh/start-stop-daemon.sh +++ b/sh/start-stop-daemon.sh @@ -63,6 +63,7 @@ ssd_start()  ssd_stop()  { +	local _progress=  	local startcommand="$(service_get_value "command")"  	local startchroot="$(service_get_value "chroot")"  	local startpidfile="$(service_get_value "pidfile")" @@ -72,13 +73,15 @@ ssd_stop()  	pidfile="${startpidfile:-$pidfile}"  	procname="${startprocname:-$procname}"  	[ -n "$command" -o -n "$procname" -o -n "$pidfile" ] || return 0 +	yesno "${command_progress}" && _progress=--progress  	ebegin "Stopping ${name:-$RC_SVCNAME}"  	start-stop-daemon --stop \  		${retry:+--retry} $retry \  		${command:+--exec} $command \  		${procname:+--name} $procname \  		${pidfile:+--pidfile} $chroot$pidfile \ -		${stopsig:+--signal} $stopsig +		${stopsig:+--signal} $stopsig \ +		${_progress}  	eend $? "Failed to stop ${name:-$RC_SVCNAME}"  } | 
