mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 11:46:30 +00:00
Merge remote-tracking branch 'thingos/dev' into thingos-next
This commit is contained in:
commit
de6ac5915b
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.29.2
|
||||
# Wed Nov 14 23:22:52 2018
|
||||
# Fri Jan 25 20:24:12 2019
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@ -525,7 +525,7 @@ CONFIG_FEATURE_NOLOGIN=y
|
||||
CONFIG_FEATURE_SECURETTY=y
|
||||
CONFIG_PASSWD=y
|
||||
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
|
||||
# CONFIG_SU is not set
|
||||
CONFIG_SU=y
|
||||
# CONFIG_FEATURE_SU_SYSLOG is not set
|
||||
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
|
||||
# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
|
||||
|
@ -170,10 +170,17 @@ rm -f ${TARGET}/usr/bin/wbinfo
|
||||
rm -f ${TARGET}/usr/sbin/winbindd
|
||||
rm -rf ${TARGET}/usr/share/ctdb
|
||||
|
||||
# useless mongodb binaries
|
||||
# unused mongodb binaries
|
||||
rm -f ${TARGET}/usr/bin/mongos
|
||||
rm -f ${TARGET}/usr/bin/mongoperf
|
||||
|
||||
# unused redis binaries
|
||||
rm -f $TARGET/usr/bin/redis-check-aof
|
||||
rm -f $TARGET/usr/bin/redis-check-rdb
|
||||
rm -f $TARGET/usr/bin/redis-benchmark
|
||||
rm -f $TARGET/usr/bin/redis-cli
|
||||
rm -f $TARGET/usr/bin/redis-sentinel
|
||||
|
||||
# v4l-utils
|
||||
rm -f ${TARGET}/usr/bin/cec-compliance
|
||||
rm -f ${TARGET}/usr/bin/cec-ctl
|
||||
@ -201,6 +208,8 @@ rm -f ${TARGET}/etc/init.d/S20urandom
|
||||
rm -f ${TARGET}/etc/init.d/S49ntp
|
||||
rm -f ${TARGET}/etc/init.d/S50sshd
|
||||
rm -f ${TARGET}/etc/init.d/S50proftpd
|
||||
rm -f ${TARGET}/etc/init.d/S50postgresql
|
||||
rm -f ${TARGET}/etc/init.d/S50redis
|
||||
rm -f ${TARGET}/etc/init.d/S80dhcp-relay
|
||||
rm -f ${TARGET}/etc/init.d/S80dhcp-server
|
||||
rm -f ${TARGET}/etc/init.d/S80dnsmasq
|
||||
|
@ -1,24 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
PROG="/sbin/syslogd"
|
||||
PROG_D="/bin/dmesg"
|
||||
|
||||
DMESG_LOG="/var/log/dmesg.log"
|
||||
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
msg_begin "Starting syslogd"
|
||||
syslogd
|
||||
${PROG}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
echo "---- booting ${OS_NAME} ${OS_VERSION} ----" >> ${DMESG_LOG}
|
||||
dmesg -T -w >> ${DMESG_LOG} &
|
||||
${PROG_D} -T -w >> ${DMESG_LOG} &
|
||||
;;
|
||||
|
||||
stop)
|
||||
msg_begin "Stopping syslogd"
|
||||
killall syslogd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
killall dmesg &>/dev/null
|
||||
killall -q $(basename ${PROG_D})
|
||||
;;
|
||||
|
||||
*)
|
||||
|
@ -1,31 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONF=/etc/udev/udev.conf
|
||||
CONF="/etc/udev/udev.conf"
|
||||
PROG="/sbin/udevd"
|
||||
PROG_UA="/sbin/udevadm"
|
||||
|
||||
|
||||
test -f ${PROG} || exit 0
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
source ${CONF}
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting eudev"
|
||||
echo '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||
/sbin/udevd --daemon --resolve-names=never
|
||||
${PROG} --daemon --resolve-names=never
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
/sbin/udevadm trigger --type=subsystems --action=add
|
||||
/sbin/udevadm trigger --type=devices --action=add
|
||||
/sbin/udevadm settle --timeout=30
|
||||
${PROG_UA} trigger --type=subsystems --action=add
|
||||
${PROG_UA} trigger --type=devices --action=add
|
||||
${PROG_UA} settle --timeout=30
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping eudev"
|
||||
udevadm control --stop-exec-queue
|
||||
killall udevd &>/dev/null
|
||||
${PROG_UA} control --stop-exec-queue
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
test -c /dev/watchdog || exit 0
|
||||
DEV="/dev/watchdog"
|
||||
|
||||
PROG="/sbin/watchdog"
|
||||
|
||||
|
||||
test -c ${PROG} || exit 0
|
||||
test -c ${DEV} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
msg_begin "Starting watchdog"
|
||||
watchdog -t 5 /dev/watchdog
|
||||
${PROG} -t 5 ${DEV}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
;;
|
||||
|
||||
@ -17,7 +24,7 @@ case "$1" in
|
||||
|
||||
reallystop)
|
||||
msg_begin "Stopping watchdog"
|
||||
killall watchdog &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
;;
|
||||
|
||||
|
@ -4,30 +4,35 @@ SYS_BTCONF="/etc/bluetooth.conf"
|
||||
BOOT_BTCONF="/boot/bluetooth.conf"
|
||||
BTCONF="/data/etc/bluetooth.conf"
|
||||
|
||||
PROG="/usr/bin/dbus-daemon"
|
||||
PROG_UG="/usr/bin/dbus-uuidgen"
|
||||
PROG_UA="/usr/bin/udevadm"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
# dbus is currently only used by bluez
|
||||
test -f ${BTCONF} || test -f ${BOOT_BTCONF} || test -f ${SYS_BTCONF} || exit 0
|
||||
|
||||
test -x /usr/bin/dbus-daemon || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
|
||||
start() {
|
||||
mkdir -p /tmp/dbus
|
||||
mkdir -p /var/lib/dbus
|
||||
|
||||
msg_begin "Starting dbus"
|
||||
|
||||
dbus-uuidgen --ensure
|
||||
dbus-daemon --system
|
||||
${PROG_UG} --ensure
|
||||
${PROG} --system
|
||||
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping dbus"
|
||||
udevadm control --stop-exec-queue
|
||||
killall dbus-daemon &>/dev/null
|
||||
${PROG_UA} control --stop-exec-queue
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
rm -f /var/run/messagebus.pid
|
||||
|
@ -9,10 +9,12 @@ PROG="/usr/sbin/hostapd"
|
||||
|
||||
WATCH_CONF="/data/etc/watch.conf"
|
||||
|
||||
link_watch=yes
|
||||
link_watch_timeout=20
|
||||
LINK_WATCH=yes
|
||||
LINK_WATCH_TIMEOUT=20
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
|
@ -13,6 +13,8 @@ BOOT_WATCH_CONF="/boot/watch.conf"
|
||||
WATCH_CONF="/data/etc/watch.conf"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${WATCH_CONF} ${SYS_WATCH_CONF} ${BOOT_WATCH_CONF}
|
||||
@ -24,7 +26,6 @@ test -f ${CONF} || exit 0
|
||||
ssid=$(cat ${CONF} | grep ssid | grep -v scan_ssid | cut -d '"' -f 2)
|
||||
test -n "${ssid}" || exit 0
|
||||
|
||||
|
||||
test "${OS_NETWORKLESS}" == "true" && exit 0
|
||||
|
||||
|
||||
|
@ -10,6 +10,8 @@ PROVIDER="mobile"
|
||||
WATCH_CONF="/data/etc/watch.conf"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
@ -88,7 +90,7 @@ start() {
|
||||
break
|
||||
fi
|
||||
|
||||
if [[ ${count} -gt ${LINK_WATCH_TIMEOUT} ]] || ! pidof pppd > /dev/null; then
|
||||
if [[ ${count} -gt ${LINK_WATCH_TIMEOUT} ]] || ! pidof $(basename ${PROG}) > /dev/null; then
|
||||
msg_fail
|
||||
return
|
||||
fi
|
||||
@ -105,7 +107,7 @@ start() {
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping pppd"
|
||||
killall pppd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
ps | grep ppp | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
msg_done
|
||||
}
|
||||
|
@ -3,34 +3,35 @@
|
||||
SYS_CONF="/etc/bluetooth.conf"
|
||||
BOOT_CONF="/boot/bluetooth.conf"
|
||||
CONF="/data/etc/bluetooth.conf"
|
||||
RUN_CONF="/var/lib/bluetooth.conf"
|
||||
|
||||
ADAPTER="hci0"
|
||||
PROG="/usr/libexec/bluetooth/bluetoothd"
|
||||
PROG_HC="/usr/bin/hciconfig"
|
||||
DATA_DIR="/var/lib/bluetooth"
|
||||
RUN_DATA_DIR="/data/bluetooth"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
hci=hci0
|
||||
bluetoothd=/usr/libexec/bluetooth/bluetoothd
|
||||
data_dir=/var/lib/bluetooth
|
||||
run_data_dir=/data/bluetooth
|
||||
run_conf=/var/lib/bluetooth.conf
|
||||
|
||||
test -x ${bluetoothd} || exit 0
|
||||
|
||||
|
||||
configure() {
|
||||
mkdir -p ${run_data_dir}
|
||||
ln -sf ${run_data_dir} ${data_dir}
|
||||
cp ${CONF} ${run_conf}
|
||||
mkdir -p ${RUN_DATA_DIR}
|
||||
ln -sf ${RUN_DATA_DIR} ${DATA_DIR}
|
||||
cp ${CONF} ${RUN_CONF}
|
||||
|
||||
# if no specific name configured, use hostname
|
||||
if ! grep -E 'Name\s*=' ${run_conf} &>/dev/null; then
|
||||
sed -ri "s/(\[General\])/\1\nName = $(hostname)/" ${run_conf}
|
||||
if ! grep -E 'Name\s*=' ${RUN_CONF} &>/dev/null; then
|
||||
sed -ri "s/(\[General\])/\1\nName = $(hostname)/" ${RUN_CONF}
|
||||
fi
|
||||
|
||||
# bring adapter up
|
||||
hciconfig ${hci} up
|
||||
${PROG_HC} ${ADAPTER} up
|
||||
}
|
||||
|
||||
start() {
|
||||
@ -38,7 +39,7 @@ start() {
|
||||
|
||||
# wait up to 10 seconds for device
|
||||
count=0
|
||||
while ! hciconfig ${hci} &>/dev/null; do
|
||||
while ! ${PROG_HC} ${ADAPTER} &>/dev/null; do
|
||||
sleep 1
|
||||
count=$((${count} + 1))
|
||||
if [[ ${count} -ge 10 ]]; then
|
||||
@ -57,19 +58,19 @@ start() {
|
||||
fi
|
||||
|
||||
msg_begin "Starting bluetoothd"
|
||||
${bluetoothd} &>/dev/null &
|
||||
${PROG} &>/dev/null &
|
||||
msg_done
|
||||
|
||||
# if DiscoverableTimeout is set to 0, make adapter discoverable from boot time
|
||||
if grep -E '^DiscoverableTimeout\s*=\s*0$' ${run_conf} &>/dev/null; then
|
||||
if grep -E '^DiscoverableTimeout\s*=\s*0$' ${RUN_CONF} &>/dev/null; then
|
||||
sleep 1
|
||||
hciconfig ${hci} piscan
|
||||
${PROG_HC} ${ADAPTER} piscan
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping bluetoothd"
|
||||
killall bluetoothd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
WATCH_CONF="/data/etc/watch.conf"
|
||||
CONF="/data/etc/watch.conf"
|
||||
NETWATCH_RETRIES=3
|
||||
NETWATCH_TIMEOUT=5
|
||||
NETWATCH_INTERVAL=20
|
||||
|
||||
|
||||
test -f ${WATCH_CONF} && source ${WATCH_CONF} || exit 0
|
||||
# watch configuration is already prepared by wifi init script
|
||||
|
||||
if [[ -z "${NETWATCH_HOST}" || -z "${NETWATCH_PORT}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
test -f ${CONF} || exit 0
|
||||
source ${CONF}
|
||||
|
||||
test -n "${NETWATCH_HOST}" || exit 0
|
||||
test -n "${NETWATCH_PORT}" || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
|
@ -10,6 +10,7 @@ test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting firewall"
|
||||
|
||||
|
@ -8,6 +8,8 @@ LOG="/var/log/dnsmasq.log"
|
||||
PROG="/usr/sbin/dnsmasq"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
@ -29,7 +31,7 @@ start() {
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping dnsmasq"
|
||||
killall dnsmasq &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -3,24 +3,30 @@
|
||||
SYS_CONF="/etc/crontabs"
|
||||
CONF="/data/etc/crontabs"
|
||||
|
||||
PROG="/usr/sbin/crond"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting crond"
|
||||
|
||||
if [[ -d ${SYS_CONF} ]]; then
|
||||
/usr/sbin/crond -c ${SYS_CONF}
|
||||
${PROG} -c ${SYS_CONF}
|
||||
fi
|
||||
|
||||
mkdir -p ${CONF}
|
||||
/usr/sbin/crond -c ${CONF}
|
||||
${PROG} -c ${CONF}
|
||||
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping crond"
|
||||
killall crond &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -2,17 +2,24 @@
|
||||
|
||||
CONF="/etc/sshd_config"
|
||||
|
||||
test -f ${CONF} || exit 0
|
||||
PROG="/usr/sbin/sshd"
|
||||
PROG_KG="/usr/bin/ssh-keygen"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
test "${OS_NETWORKLESS}" == "true" && exit 0
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting sshd"
|
||||
|
||||
# create any missing keys
|
||||
if ! /usr/bin/ssh-keygen -A >/dev/null; then
|
||||
if ! ${PROG_KG} -A >/dev/null; then
|
||||
msg_fail
|
||||
return 1
|
||||
fi
|
||||
@ -22,13 +29,13 @@ start() {
|
||||
echo "Welcome to ${hostname}!" > /var/cache/sshd_banner
|
||||
sync
|
||||
|
||||
/usr/sbin/sshd -f ${CONF}
|
||||
${PROG} -f ${CONF}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping sshd"
|
||||
killall sshd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
test -f /etc/proftpd.conf || exit 0
|
||||
CONF="/etc/proftpd.conf"
|
||||
PROG="/usr/sbin/proftpd"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
test -n "${OS_DEBUG}" || source /etc/init.d/conf
|
||||
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
test "${OS_NETWORKLESS}" == "true" && exit 0
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting proftpd"
|
||||
mkdir -p /var/run/proftpd
|
||||
touch /var/log/wtmp
|
||||
/usr/sbin/proftpd &>/dev/null
|
||||
${PROG} &>/dev/null
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping proftpd"
|
||||
killall proftpd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
@ -1,32 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
test -f /etc/samba/smb.conf || exit 0
|
||||
CONF="/etc/samba/smb.conf"
|
||||
|
||||
PROG="/usr/sbin/smbd"
|
||||
PROG_N="/usr/sbin/nmbd"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
test -n "${OS_DEBUG}" || source /etc/init.d/conf
|
||||
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
test "${OS_NETWORKLESS}" == "true" && exit 0
|
||||
|
||||
|
||||
start() {
|
||||
mkdir -p /var/log/samba
|
||||
mkdir -p /var/lib/samba/private
|
||||
|
||||
msg_begin "Starting smbd"
|
||||
smbd -D
|
||||
${PROG} -D
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
msg_begin "Starting nmbd"
|
||||
nmbd -D
|
||||
${PROG_N} -D
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping smbd"
|
||||
killall smbd &>/dev/null
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
msg_begin "Stopping nmbd"
|
||||
killall nmbd &>/dev/null
|
||||
killall -q $(basename ${PROG_N})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
|
50
board/common/overlay/etc/init.d/S70mongod
Executable file
50
board/common/overlay/etc/init.d/S70mongod
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
SYS_CONF="/etc/mongodb.conf"
|
||||
BOOT_CONF="/boot/mongodb.conf"
|
||||
CONF="/data/etc/mongodb.conf"
|
||||
|
||||
PROG="/usr/bin/mongod"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting mongod"
|
||||
db_dir=$(cat ${CONF} | grep dbpath | cut -d '=' -f 2)
|
||||
mkdir -p ${db_dir}
|
||||
${PROG} -f ${CONF} --fork > /dev/null
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping mongod"
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
50
board/common/overlay/etc/init.d/S71redis
Executable file
50
board/common/overlay/etc/init.d/S71redis
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
SYS_CONF="/etc/redis.conf"
|
||||
BOOT_CONF="/boot/redis.conf"
|
||||
CONF="/data/etc/redis.conf"
|
||||
|
||||
PROG="/usr/bin/redis-server"
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
test -f ${CONF} || exit 0
|
||||
|
||||
|
||||
start() {
|
||||
msg_begin "Starting redis"
|
||||
db_dir=$(cat ${CONF} | grep -E '^dir' | cut -d ' ' -f 2)
|
||||
mkdir -p ${db_dir}
|
||||
${PROG} ${CONF}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping redis"
|
||||
killall -q $(basename ${PROG})
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
70
board/common/overlay/etc/init.d/S72postgresql
Executable file
70
board/common/overlay/etc/init.d/S72postgresql
Executable file
@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
BOOT_CONF="/boot/postgresql.conf"
|
||||
SYS_CONF="/etc/postgresql.conf"
|
||||
CONF="/data/etc/postgresql.conf"
|
||||
|
||||
PROG="/usr/bin/pg_ctl"
|
||||
|
||||
DB_DIR="/var/lib/postgresql"
|
||||
USER="postgres"
|
||||
LOG="/var/log/postgresql.log"
|
||||
|
||||
|
||||
function run_pg_ctl() {
|
||||
su ${USER} -c "pg_ctl $*"
|
||||
}
|
||||
|
||||
|
||||
test -x ${PROG} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
prepare_conf ${CONF} ${SYS_CONF} ${BOOT_CONF}
|
||||
|
||||
|
||||
start() {
|
||||
mkdir -p ${DB_DIR}
|
||||
chown -R ${USER} ${DB_DIR}
|
||||
touch ${LOG}
|
||||
chown ${USER} ${LOG}
|
||||
cd ${DB_DIR}
|
||||
|
||||
if [[ ! -f ${DB_DIR}/PG_VERSION ]]; then
|
||||
msg_begin "Initializing postgresql db"
|
||||
run_pg_ctl initdb -s -D ${DB_DIR} &>> ${LOG}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
echo "include_if_exists = '/data/etc/postgresql.conf'" >> ${DB_DIR}/postgresql.conf
|
||||
fi
|
||||
|
||||
msg_begin "Starting postgresql"
|
||||
run_pg_ctl start -s -D ${DB_DIR} -l ${LOG}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
stop() {
|
||||
msg_begin "Stopping postgresql"
|
||||
run_pg_ctl stop -s -D ${DB_DIR} -m fast &>> ${LOG}
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
@ -48,5 +48,7 @@ if [ -r ${BOARD_DIR}/os.conf ]; then
|
||||
fi
|
||||
|
||||
# add admin user alias
|
||||
echo "admin:x:0:0:root:/root:/bin/sh" >> ${TARGET}/etc/passwd
|
||||
if ! grep -E '^admin:' ${TARGET}/etc/passwd &> /dev/null; then
|
||||
echo "admin:x:0:0:root:/root:/bin/sh" >> ${TARGET}/etc/passwd
|
||||
fi
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
index 2844b497464d..a4b0bb432368 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -3060,6 +3060,8 @@ int stmmac_dvr_probe(struct device *device,
|
||||
goto error_netdev_register;
|
||||
}
|
||||
|
||||
+ netif_carrier_off(ndev);
|
||||
+
|
||||
wake_lock_init(&priv->plat->wol_wake_lock, WAKE_LOCK_SUSPEND, "wol_wake_lock");
|
||||
|
||||
return ret;
|
9
build.sh
9
build.sh
@ -66,6 +66,13 @@ if ! [ -f $basedir/configs/${board}_defconfig ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function prepare_target_dir() {
|
||||
if [ -L $outputdir/target/var/lib ]; then
|
||||
rm $outputdir/target/var/lib
|
||||
mkdir $outputdir/target/var/lib
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p $outputdir
|
||||
|
||||
if ! [ -f $outputdir/.config ]; then
|
||||
@ -135,9 +142,11 @@ elif [[ "$target" == initramfs* ]]; then
|
||||
fi
|
||||
|
||||
elif [ "$target" == "all" ]; then
|
||||
prepare_target_dir
|
||||
make O=$outputdir all
|
||||
|
||||
elif [ -n "$target" ]; then
|
||||
prepare_target_dir
|
||||
make O=$outputdir $target
|
||||
|
||||
else # if [ -z "$target ]
|
||||
|
@ -2,17 +2,17 @@ BR2_arm=y
|
||||
BR2_cortex_a17=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_CCACHE=y
|
||||
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-bananapim1"
|
||||
BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-tinkerboard"
|
||||
BR2_OPTIMIZE_2=y
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TARGET_OPTIMIZATION="-pipe"
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
BR2_TARGET_TZ_INFO=y
|
||||
BR2_ROOTFS_OVERLAY="board/common/overlay board/bananapim1/overlay"
|
||||
BR2_ROOTFS_OVERLAY="board/common/overlay board/tinkerboard/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/TinkerBoard/debian_kernel/archive/4cf992a71ecfed2a817219cf83aba5bf8c5d1d69.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/TinkerBoard/debian_kernel/archive/1a0fdafdf55afa88272fb61c8b910ed885d7fada.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="miniarm-rk3288"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-miniarm"
|
||||
|
12
package/python-apispec/0001-fix-setup-encoding.patch
Normal file
12
package/python-apispec/0001-fix-setup-encoding.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr apispec-0.39.0-orig/setup.py apispec-0.39.0-patched/setup.py
|
||||
--- apispec-0.39.0-orig/setup.py 2018-06-29 05:50:26.000000000 +0300
|
||||
+++ apispec-0.39.0-patched/setup.py 2019-01-24 23:36:41.947206745 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
Raises RuntimeError if not found.
|
||||
"""
|
||||
version = ''
|
||||
- with open(fname, 'r') as fp:
|
||||
+ with open(fname, 'r', encoding='utf-8') as fp:
|
||||
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
|
||||
for line in fp:
|
||||
m = reg.match(line)
|
@ -1,7 +1,6 @@
|
||||
config BR2_PACKAGE_PYTHON_MOCK
|
||||
bool "python-mock"
|
||||
depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
|
||||
depends on BR2_PACKAGE_PYTHON_PBR
|
||||
help
|
||||
mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used.
|
||||
|
||||
|
@ -10,5 +10,6 @@ PYTHON_MOCK_SITE = https://files.pythonhosted.org/packages/0c/53/014354fc93c591c
|
||||
PYTHON_MOCK_SETUP_TYPE = setuptools
|
||||
PYTHON_MOCK_LICENSE = Apache-2.0
|
||||
PYTHON_MOCK_LICENSE_FILES = LICENSE.txt
|
||||
PYTHON_MOCK_DEPENDENCIES = host-python-pbr
|
||||
|
||||
$(eval $(python-package))
|
||||
|
Loading…
x
Reference in New Issue
Block a user