}
append_bogusnxdomain() {
- xappend "--bogus-nxdomain=$1"
+ xappend "--bogus-nxdomain=$1"
}
dnsmasq() {
STOP=50
USE_PROCD=1
-
-NAME=dropbear
PROG=/usr/sbin/dropbear
+NAME=dropbear
PIDCOUNT=0
EXTRA_COMMANDS="killclients"
EXTRA_HELP=" killclients Kill ${NAME} processes except servers and yourself"
#!/bin/sh /etc/rc.common
# Copyright (c) 2011-2012 OpenWrt.org
+
START=80
USE_PROCD=1
fi
}
- procd_open_instance
- procd_set_param command "$PROG"
+ procd_open_instance
+ procd_set_param command "$PROG"
local net networks
config_get networks "$cfg" network
local fwd_dhcp # = 1
config_get_bool fwd_dhcp "$cfg" forward_dhcp 1
- [ $fwd_dhcp -eq 1 ] && procd_append_param command"-D"
+ [ $fwd_dhcp -eq 1 ] && procd_append_param command "-D"
procd_close_instance
}
STOP=89
USE_PROCD=1
-NAME=logread
PROG=/sbin/logread
start_service_file()
local log_file log_size
config_get log_file $1 log_file
- config_get log_size $1 log_size
+ config_get log_size $1 log_size
[ -z "${log_file}" ] && return
procd_open_instance
procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
- [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
+ [ -n "${log_size}" ] && procd_append_param command -S "$log_size"
procd_close_instance
}
procd_open_instance
procd_set_param command "$PROG" -f -r "$log_ip" "${log_port:-514}" -p "$pid_file"
- [ "${log_proto}" != "udp" ] || procd_append_param command -u
+ [ "${log_proto}" != "udp" ] || procd_append_param command -u
procd_close_instance
}
USE_PROCD=1
PROG=/usr/sbin/crond
-NAME=crond
start_service () {
[ -z "$(ls /etc/crontabs/)" ] && return 1
USE_PROCD=1
PROG=/usr/sbin/ntpd
-SERVICE_PID_FILE=/var/run/sysntpd.pid
start_service() {
local peers
procd_open_instance
procd_set_param command "$PROG" -n
- [ $enable_server -ne 0 ] && procd_append_param command -l
+ [ $enable_server -ne 0 ] && procd_append_param command -l
[ -n "$peers" ] && {
local peer
for peer in $peers; do
# Copyright (C) 2006-2011 OpenWrt.org
START=50
+
USE_PROCD=1
PROG=/usr/sbin/telnetd
-NAME=telnetd
has_root_pwd() {
local pwd=$([ -f "$1" ] && cat "$1")
! has_root_pwd /etc/passwd && ! has_root_pwd /etc/shadow ) || \
( ! /etc/init.d/dropbear enabled 2> /dev/null && ! /etc/init.d/sshd enabled 2> /dev/null );
then
- procd_open_instance
- procd_set_param command "$PROG" -F -l /bin/login.sh
+ procd_open_instance
+ procd_set_param command "$PROG" -F -l /bin/login.sh
procd_close_instance
fi
}