tree: fix install

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-09-07 12:38:32 +02:00
parent 03553946ac
commit 06b0a7c172
2 changed files with 4 additions and 2 deletions

View File

@ -140,7 +140,7 @@ elif [ "${1}" = "patches" ]; then
MACR="$(echo "${I}" | cut -d. -f2 | cut -d= -f1 | sed 's/://g; s/.*/\L&/')"
IPRS="$(echo "${I}" | cut -d= -f2)"
for ETH in $(ls /sys/class/net/ 2>/dev/null | grep eth); do
MACX=$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g; s/.*/\L&/')
MACX=$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g; s/.*/\L&/' | tr '[:lower:]' '[:upper:]')
if [ "${MACR}" = "${MACX}" ]; then
echo "Setting IP for ${ETH} to ${IPRS}"
mkdir -p /etc/sysconfig/network-scripts
@ -216,6 +216,7 @@ elif [ "${1}" = "late" ]; then
# service
SERVICE_PATH="/tmpRoot/usr/lib/systemd/system"
sed -i 's|ExecStart=/|ExecStart=/|g' ${SERVICE_PATH}/syno-oob-check-status.service ${SERVICE_PATH}/SynoInitEth.service ${SERVICE_PATH}/syno_update_disk_logs.service
# getty
for I in $(cat /proc/cmdline 2>/dev/null | grep -oE 'getty=[^ ]+' | sed 's/getty=//'); do
TTYN="$(echo "${I}" | cut -d',' -f1)"
@ -258,7 +259,7 @@ elif [ "${1}" = "late" ]; then
for ETH in $(cat /etc/ifcfgs); do
echo "Copy ifcfg-${ETH}"
if [ -f "/etc/sysconfig/network-scripts/ifcfg-${ETH}" ]; then
rm -vf /tmpRoot/etc/sysconfig/network-scripts/ifcfg-*${ETH} /tmpRoot/etc.defaults/sysconfig/network-scripts/ifcfg-*${ETH}
rm -vf /tmpRoot/etc/sysconfig/network-scripts/ifcfg-* /tmpRoot/etc.defaults/sysconfig/network-scripts/ifcfg-*
cp -vf /etc/sysconfig/network-scripts/ifcfg-${ETH} /tmpRoot/etc/sysconfig/network-scripts/
cp -vf /etc/sysconfig/network-scripts/ifcfg-${ETH} /tmpRoot/etc.defaults/sysconfig/network-scripts/
fi

View File

@ -14,6 +14,7 @@ if [ "${1}" = "late" ]; then
cp -vf "/usr/bin/sspatch.sh" "/tmpRoot/usr/bin/sspatch.sh"
cp -vf "/usr/lib/sspatch.tgz" "/tmpRoot/usr/arc/sspatch.tgz"
cp -vf "/usr/lib/sspatch-openvino.tgz" "/tmpRoot/usr/arc/sspatch-openvino.tgz"
cp -vf "/usr/lib/sspatch-3221.tgz" "/tmpRoot/usr/arc/sspatch-3221.tgz"
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"