diff options
author | Nicolas Thill <nico@openwrt.org> | 2011-11-07 22:58:34 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2011-11-07 22:58:34 +0000 |
commit | 93886bc77667952afa306863c766cad00821074e (patch) | |
tree | ef648c4f579ed3363cc52af2c9b09f4384159413 /package/base-files/files/etc/init.d/boot | |
parent | 10a03275bfcaeca706c2bd20064431f6f3bb6bf5 (diff) | |
download | mtk-20170518-93886bc77667952afa306863c766cad00821074e.zip mtk-20170518-93886bc77667952afa306863c766cad00821074e.tar.gz mtk-20170518-93886bc77667952afa306863c766cad00821074e.tar.bz2 |
package/base-files: use new service wrapper
SVN-Revision: 28835
Diffstat (limited to 'package/base-files/files/etc/init.d/boot')
-rwxr-xr-x | package/base-files/files/etc/init.d/boot | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 7f6b267..44b53fe 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org START=10 STOP=98 @@ -23,24 +23,25 @@ system_config() { [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime if [ -x /sbin/syslogd ]; then - local log_ip log_size log_port log_type log_file + local args log_ip log_size log_port log_type log_file config_get log_ip "$cfg" log_ip config_get log_size "$cfg" log_size 16 config_get log_port "$cfg" log_port 514 config_get log_type "$cfg" log_type circular config_get log_file "$cfg" log_file "/var/log/messages" + args="${log_ip:+-L -R ${log_ip}:${log_port}} ${conloglevel:+-l $conloglevel}" if [ "$log_type" = "file" ]; then - syslogd -s $log_size -O $log_file \ - ${log_ip:+-L -R ${log_ip}:${log_port}} \ - ${conloglevel:+-l $conloglevel} -S + args="$args -s $log_size -O $log_file -S" else - syslogd -C${log_size} \ - ${log_ip:+-L -R ${log_ip}:${log_port}} \ - ${conloglevel:+-l $conloglevel} + args="$args -C${log_size}" fi + service_start /sbin/syslogd $args + fi + if [ -x /sbin/klogd ]; then + config_get klogconloglevel "$cfg" klogconloglevel + args="${klogconloglevel:+-c $klogconloglevel}" + service_start /sbin/klogd $args fi - config_get klogconloglevel "$cfg" klogconloglevel - [ -x /sbin/klogd ] && klogd ${klogconloglevel:+-c $klogconloglevel} } apply_uci_config() { @@ -101,6 +102,6 @@ start() { } stop() { - killall -9 syslogd 2> /dev/null + service_stop /sbin/klogd + service_stop /sbin/syslogd } - |