mirror of https://github.com/hak5/openwrt.git
parent
10a03275bf
commit
93886bc776
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=86
|
PKG_RELEASE:=87
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
|
||||||
START=10
|
START=10
|
||||||
STOP=98
|
STOP=98
|
||||||
|
@ -23,24 +23,25 @@ system_config() {
|
||||||
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
|
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
|
||||||
|
|
||||||
if [ -x /sbin/syslogd ]; then
|
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_ip "$cfg" log_ip
|
||||||
config_get log_size "$cfg" log_size 16
|
config_get log_size "$cfg" log_size 16
|
||||||
config_get log_port "$cfg" log_port 514
|
config_get log_port "$cfg" log_port 514
|
||||||
config_get log_type "$cfg" log_type circular
|
config_get log_type "$cfg" log_type circular
|
||||||
config_get log_file "$cfg" log_file "/var/log/messages"
|
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
|
if [ "$log_type" = "file" ]; then
|
||||||
syslogd -s $log_size -O $log_file \
|
args="$args -s $log_size -O $log_file -S"
|
||||||
${log_ip:+-L -R ${log_ip}:${log_port}} \
|
|
||||||
${conloglevel:+-l $conloglevel} -S
|
|
||||||
else
|
else
|
||||||
syslogd -C${log_size} \
|
args="$args -C${log_size}"
|
||||||
${log_ip:+-L -R ${log_ip}:${log_port}} \
|
|
||||||
${conloglevel:+-l $conloglevel}
|
|
||||||
fi
|
fi
|
||||||
|
service_start /sbin/syslogd $args
|
||||||
fi
|
fi
|
||||||
|
if [ -x /sbin/klogd ]; then
|
||||||
config_get klogconloglevel "$cfg" klogconloglevel
|
config_get klogconloglevel "$cfg" klogconloglevel
|
||||||
[ -x /sbin/klogd ] && klogd ${klogconloglevel:+-c $klogconloglevel}
|
args="${klogconloglevel:+-c $klogconloglevel}"
|
||||||
|
service_start /sbin/klogd $args
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_uci_config() {
|
apply_uci_config() {
|
||||||
|
@ -101,6 +102,6 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
killall -9 syslogd 2> /dev/null
|
service_stop /sbin/klogd
|
||||||
|
service_stop /sbin/syslogd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
|
|
||||||
START=98
|
START=98
|
||||||
|
|
||||||
BIN=/usr/sbin/ntpd
|
SERVICE_DAEMONIZE=1
|
||||||
PID=/var/run/sysntpd.pid
|
SERVICE_WRITE_PID=1
|
||||||
|
SERVICE_PID_FILE=/var/run/sysntpd.pid
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -x $BIN ] || exit 0
|
[ -x $PROG ] || return 1
|
||||||
|
|
||||||
local peers
|
local peers
|
||||||
|
|
||||||
|
@ -25,11 +26,10 @@ start() {
|
||||||
append args "-p $peer"
|
append args "-p $peer"
|
||||||
done
|
done
|
||||||
|
|
||||||
start-stop-daemon -x $BIN -m -p $PID -b -S -- $args
|
service_start /usr/sbin/ntpd $args
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
service_kill ${BIN##*/} $PID
|
service_stop /usr/sbin/ntpd
|
||||||
rm -f $PID
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyright (C) 2008-2010 OpenWrt.org
|
# Copyright (C) 2008-2011 OpenWrt.org
|
||||||
|
|
||||||
START=97
|
START=97
|
||||||
start() {
|
|
||||||
[ -c /dev/watchdog ] && [ -x /sbin/watchdog ] && \
|
|
||||||
watchdog -t 5 /dev/watchdog
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
start() {
|
||||||
killall -q watchdog
|
[ -c /dev/watchdog ] || return 1
|
||||||
|
[ -x /sbin/watchdog ] || return 1
|
||||||
|
service_start /sbin/watchdog -t 5 /dev/watchdog
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
service_stop /sbin/watchdog
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue