mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
86758661b2
commit
17dfe50da8
Binary file not shown.
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
if [ "${1}" = "early" ]; then
|
if [ "${1}" = "early" ]; then
|
||||||
echo "Installing addon eudev - ${1}"
|
echo "Installing addon eudev - ${1}"
|
||||||
tar zxf /addons/eudev-7.1.tgz -C /
|
tar -zxf /addons/eudev-7.1.tgz -C /
|
||||||
|
[ ! -L "/usr/sbin/modinfo" ] && ln -vsf /usr/bin/kmod /usr/sbin/modinfo
|
||||||
|
|
||||||
elif [ "${1}" = "modules" ]; then
|
elif [ "${1}" = "modules" ]; then
|
||||||
echo "Installing addon eudev - ${1}"
|
echo "Installing addon eudev - ${1}"
|
||||||
@ -37,10 +38,27 @@ elif [ "${1}" = "modules" ]; then
|
|||||||
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm && /usr/sbin/rmmod kvm || true
|
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm && /usr/sbin/rmmod kvm || true
|
||||||
/usr/sbin/lsmod 2>/dev/null | grep -q ^irqbypass && /usr/sbin/rmmod irqbypass || true
|
/usr/sbin/lsmod 2>/dev/null | grep -q ^irqbypass && /usr/sbin/rmmod irqbypass || true
|
||||||
|
|
||||||
|
# getty
|
||||||
|
# Find the getty setting in cmdline
|
||||||
|
for I in $(cat /proc/cmdline 2>/dev/null | grep -oE 'getty=[^ ]+' | sed 's/getty=//'); do
|
||||||
|
TTYN="$(echo "${I}" | cut -d',' -f1)"
|
||||||
|
BAUD="$(echo "${I}" | cut -d',' -f2 | cut -d'n' -f1)"
|
||||||
|
echo "ttyS0 ttyS1 ttyS2" | grep -qw "${TTYN}" && continue
|
||||||
|
if [ -n "${TTYN}" ] && [ -e "/dev/${TTYN}" ]; then
|
||||||
|
echo "Starting getty on ${TTYN}"
|
||||||
|
if [ -n "${BAUD}" ]; then
|
||||||
|
/usr/sbin/getty -L "${TTYN}" "${BAUD}" linux &
|
||||||
|
else
|
||||||
|
/usr/sbin/getty -L "${TTYN}" linux &
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon eudev - ${1}"
|
echo "Installing addon eudev - ${1}"
|
||||||
|
|
||||||
[ ! -L "/tmpRoot/usr/sbin/modinfo" ] && ln -vsf /usr/bin/kmod /tmpRoot/usr/sbin/modinfo
|
[ ! -L "/tmpRoot/usr/sbin/modinfo" ] && ln -vsf /usr/bin/kmod /tmpRoot/usr/sbin/modinfo
|
||||||
|
[ ! -L "/tmpRoot/usr/sbin/depmod" ] && ln -vsf /usr/bin/kmod /tmpRoot/usr/sbin/depmod
|
||||||
|
|
||||||
echo "copy modules"
|
echo "copy modules"
|
||||||
isChange="false"
|
isChange="false"
|
||||||
|
@ -237,6 +237,21 @@ elif [ "${1}" = "late" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# syslog-ng
|
||||||
|
if [ -f /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf ]; then
|
||||||
|
cp -vfp /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf.bak
|
||||||
|
sed -i 's/destination(d_scemd)/flags(final)/g' /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf
|
||||||
|
else
|
||||||
|
echo "scemd.conf does not exist."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /tmpRoot/etc.defaults/syslog-ng/patterndb.d/synosystemd.conf ]; then
|
||||||
|
cp -vfp /tmpRoot/etc.defaults/syslog-ng/patterndb.d/synosystemd.conf /tmpRoot/etc.defaults/syslog-ng/patterndb.d/synosystemd.conf.bak
|
||||||
|
sed -i 's/destination(d_synosystemd)/flags(final)/g; s/destination(d_systemd)/flags(final)/g' /tmpRoot/etc.defaults/syslog-ng/patterndb.d/synosystemd.conf
|
||||||
|
else
|
||||||
|
echo "synosystemd.conf does not exist."
|
||||||
|
fi
|
||||||
|
|
||||||
# Community Packages
|
# Community Packages
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/packages/feeds ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/packages/feeds ]; then
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/packages
|
mkdir -p /tmpRoot/usr/syno/etc/packages
|
||||||
|
@ -6,30 +6,6 @@
|
|||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Get values in synoinfo.conf K=V file
|
|
||||||
# 1 - key
|
|
||||||
function _get_conf_kv() {
|
|
||||||
grep "${1}=" /etc/synoinfo.conf 2>/dev/null | sed "s|^${1}=\"\(.*\)\"$|\1|g"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Replace/add values in synoinfo.conf K=V file
|
|
||||||
# Args: $1 rd|hd, $2 key, $3 val
|
|
||||||
function _set_conf_kv() {
|
|
||||||
local ROOT
|
|
||||||
local FILE
|
|
||||||
[ "$1" = "rd" ] && ROOT="" || ROOT="/tmpRoot"
|
|
||||||
for SD in etc etc.defaults; do
|
|
||||||
FILE="${ROOT}/${SD}/synoinfo.conf"
|
|
||||||
# Replace
|
|
||||||
if grep -q "^$2=" ${FILE}; then
|
|
||||||
sed -i ${FILE} -e "s\"^$2=.*\"$2=\\\"$3\\\"\""
|
|
||||||
else
|
|
||||||
# Add if doesn't exist
|
|
||||||
echo "$2=\"$3\"" >>${FILE}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "${1}" = "patches" ]; then
|
if [ "${1}" = "patches" ]; then
|
||||||
echo "Installing addon sortnetif - ${1}"
|
echo "Installing addon sortnetif - ${1}"
|
||||||
|
|
||||||
@ -50,20 +26,21 @@ if [ "${1}" = "patches" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
ETHLIST="$(echo -e "${ETHLISTTMPM}${ETHLISTTMPB}" | grep -v '^$')"
|
ETHLIST="$(echo -e "${ETHLISTTMPM}${ETHLISTTMPB}" | grep -v '^$')"
|
||||||
ETHSEQ="$(echo -e "${ETHLIST}" | awk '{print $3}' | sed 's/eth//g' | tr '\n' ' ')"
|
ETHSEQ="$(echo -e "${ETHLIST}" | awk '{print $3}' | sed 's/eth//g')"
|
||||||
ETHNUM="$(echo -e "${ETHLIST}" | wc -l)"
|
ETHNUM="$(echo -e "${ETHLIST}" | wc -l)"
|
||||||
|
|
||||||
_set_conf_kv rd netif_seq "${ETHSEQ}"
|
echo "${ETHSEQ}"
|
||||||
|
# sort
|
||||||
if [ -x /usr/syno/bin/synonetseqadj ]; then
|
if [ ! "${ETHSEQ}" = "$(seq 0 $((${ETHNUM:0} - 1)))" ]; then
|
||||||
/usr/syno/bin/synonetseqadj
|
/etc/rc.network stop
|
||||||
else
|
for i in $(seq 0 $((${ETHNUM:0} - 1))); do
|
||||||
echo "sortnetif error: synonetseqadj not found!"
|
ip link set dev eth${i} name tmp${i}
|
||||||
|
done
|
||||||
|
I=0
|
||||||
|
for i in ${ETHSEQ}; do
|
||||||
|
ip link set dev tmp${i} name eth${I}
|
||||||
|
I=$((${I} + 1))
|
||||||
|
done
|
||||||
|
/etc/rc.network start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ "${1}" = "late" ]; then
|
|
||||||
echo "Installing addon sortnetif - ${1}"
|
|
||||||
|
|
||||||
ETHSEQ="$(_get_conf_kv netif_seq)"
|
|
||||||
_set_conf_kv hd netif_seq "${ETHSEQ}"
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user