FreeBSD Bugzilla – Attachment 157273 Details for
Bug 198736
net-mgmt/smokeping init script fails to check pid correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for smokeping.in
patch.txt (text/plain), 1.79 KB, created by
Kan Sasaki
on 2015-05-30 01:53:11 UTC
(
hide
)
Description:
patch for smokeping.in
Filename:
MIME Type:
Creator:
Kan Sasaki
Created:
2015-05-30 01:53:11 UTC
Size:
1.79 KB
patch
obsolete
>Index: files/smokeping.in >=================================================================== >--- files/smokeping.in (revision 387911) >+++ files/smokeping.in (working copy) >@@ -28,6 +28,7 @@ > configtest_cmd="smokeping_configtest" > reload_cmd="smokeping_reload" > stop_cmd="smokeping_stop" >+start_precmd="smokeping_startprecmd" > > : ${smokeping_enable:=NO} > # pidfile is hardcoded in Smokeping.pm, not configurable >@@ -45,39 +46,56 @@ > { > if [ ! -e ${smokeping_logfile} ]; > then >- install -o %%USERS%% -g %%GROUPS%% /dev/null ${smokeping_logfile} || echo "ERROR: Could not initialize logfile at ${smokeping_logfile}."; >+ install -o ${smokeping_user} -g ${smokeping_group} -m 644 /dev/null ${smokeping_logfile} ||\ >+ echo "ERROR: Could not initialize logfile at ${smokeping_logfile}."; > fi > } > >+smokeping_check_pidfile() >+{ >+ rc_pid=$(check_pidfile $pidfile $command) >+ if [ -z "${rc_pid}" ]; then >+ rc_pid=$(check_pidfile $pidfile $command $command_interpreter) >+ fi >+} >+ > smokeping_status() > { >- rc_pid=$(check_pidfile $pidfile $command) >+ smokeping_check_pidfile > if [ -z "$rc_pid" ]; then >- _run_rc_notrunning >+ echo "${name} is not running." >+ return 1 > else > echo "${name} is running as pid $rc_pid" >- fi >+ fi > } > > smokeping_configtest() > { >- /usr/local/bin/smokeping --check >+ ${command} --check > } > > smokeping_reload() > { >- /usr/local/bin/smokeping --reload >+ smokeping_check_pidfile >+ if [ -z "$rc_pid" ]; then >+ _run_rc_notrunning >+ return 1 >+ else >+ ${command} --reload >+ fi > } > > smokeping_stop() > { >- rc_pid=$(check_pidfile $pidfile $command) >+ smokeping_check_pidfile > if [ -z "$rc_pid" ]; then > _run_rc_notrunning >+ return 1 > else >- echo "Stopping ${name} (pid $rc_pid)." >- kill -15 $rc_pid >- fi >+ echo "Stopping ${name}." >+ kill -TERM $rc_pid >+ fi > } > > load_rc_config $name
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198736
:
154574
|
157273
|
157298