From f87409440298121ae1fbd718a17267cc180438e4 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 17 Sep 2013 21:45:30 +0000 Subject: procd: convert various packages to procd style init.d scripts Signed-off-by: John Crispin SVN-Revision: 38023 --- package/system/procd/files/log.init | 5 ----- package/system/rpcd/files/rpcd.init | 11 +++++++---- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'package/system') diff --git a/package/system/procd/files/log.init b/package/system/procd/files/log.init index 4a878fe..14fbdf8 100644 --- a/package/system/procd/files/log.init +++ b/package/system/procd/files/log.init @@ -8,7 +8,6 @@ STOP=89 USE_PROCD=1 NAME=logread PROG=/sbin/logread -PIDCOUNT=1 start_service_file() { @@ -24,8 +23,6 @@ start_service_file() procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file" [ -n "${log_size}" ] && procd_append_param command -S "$log_size" procd_close_instance - - PIDCOUNT="$(( ${PIDCOUNT} + 1))" } start_service_remote() @@ -43,8 +40,6 @@ start_service_remote() procd_set_param command "$PROG" -f -r "$log_ip" "${log_port:-514}" -p "$pid_file" [ "${log_proto}" != "udp" ] || procd_append_param command -u procd_close_instance - - PIDCOUNT="$(( ${PIDCOUNT} + 1))" } service_triggers() diff --git a/package/system/rpcd/files/rpcd.init b/package/system/rpcd/files/rpcd.init index 2132f16..98b6333 100755 --- a/package/system/rpcd/files/rpcd.init +++ b/package/system/rpcd/files/rpcd.init @@ -2,11 +2,14 @@ START=12 -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 +USE_PROCD=1 +NAME=rpcd +PROG=/sbin/rpcd -start() { - service_start /sbin/rpcd +start_service() { + procd_open_instance + procd_set_param command "$PROG" + procd_close_instance } stop() { -- cgit v1.1