Fix rc.d status command for virtual_oss.
PR: 250046 Approved by: pi (implicit)
This commit is contained in:
parent
9f908df206
commit
3985eedae7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=551619
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= virtual_oss
|
||||
PORTVERSION= 1.2.6
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= http://www.selasky.org/hans_petter/distfiles/ \
|
||||
http://home.selasky.org/distfiles/
|
||||
|
@ -34,6 +34,8 @@ rcvar=${name}_enable
|
||||
start_precmd="${name}_precmd"
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
status_cmd="${name}_status"
|
||||
|
||||
# required_modules="cuse"
|
||||
virtual_oss_default_args="\
|
||||
-T /dev/sndstat \
|
||||
@ -67,6 +69,13 @@ virtual_oss()
|
||||
env LD_PRELOAD=%%LIBFFTW3%%%%LIBSAMPLERATE%% %%PREFIX%%/sbin/virtual_oss $*
|
||||
}
|
||||
|
||||
virtual_oss_pids()
|
||||
{
|
||||
pids=$(pgrep -d ' ' $name)
|
||||
pids=${pids% }
|
||||
printf "${pids}"
|
||||
}
|
||||
|
||||
virtual_oss_precmd()
|
||||
{
|
||||
/usr/bin/install -d -m 0755 -o root ${pidpath}
|
||||
@ -125,4 +134,16 @@ virtual_oss_stop()
|
||||
done
|
||||
}
|
||||
|
||||
virtual_oss_status()
|
||||
{
|
||||
pids=$(virtual_oss_pids)
|
||||
|
||||
if [ "${pids}" ]; then
|
||||
echo "${name} is running as pid ${pids}."
|
||||
else
|
||||
echo "${name} is not running."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command $*
|
||||
|
Loading…
Reference in New Issue
Block a user