mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
41ca53236f
commit
886f15f4c2
Binary file not shown.
@ -9,13 +9,13 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon acpid - ${1}"
|
echo "Installing addon acpid - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/usr/ ./bin ./sbin ./lib
|
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/usr/ ./bin ./sbin ./lib
|
||||||
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/ ./etc
|
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/ ./etc
|
||||||
sed -i '/^Exec/s|=/|=/|g' /tmpRoot/usr/lib/systemd/system/acpid.service
|
sed -i '/^Exec/s|=/|=/|g' /tmpRoot/usr/lib/systemd/system/acpid.service
|
||||||
if [ -f /usr/lib/modules/button.ko ]; then
|
if [ -f /usr/lib/modules/button.ko ]; then
|
||||||
cp -vf /usr/lib/modules/button.ko /tmpRoot/usr/lib/modules/button.ko
|
cp -pf /usr/lib/modules/button.ko /tmpRoot/usr/lib/modules/button.ko
|
||||||
else
|
else
|
||||||
echo "No button.ko found"
|
echo "No button.ko found"
|
||||||
fi
|
fi
|
||||||
|
@ -9,14 +9,13 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon addincards - ${1}"
|
echo "Installing addon addincards - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
MODEL="$(cat /proc/sys/kernel/syno_hw_version)"
|
MODEL="$(cat /proc/sys/kernel/syno_hw_version)"
|
||||||
FILE="/tmpRoot/usr/syno/etc/adapter_cards.conf"
|
FILE="/tmpRoot/usr/syno/etc/adapter_cards.conf"
|
||||||
|
|
||||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
||||||
|
cp -pf "${FILE}" "${FILE}.tmp"
|
||||||
cp -f "${FILE}" "${FILE}.tmp"
|
|
||||||
echo -n "" >"${FILE}"
|
echo -n "" >"${FILE}"
|
||||||
for N in $(cat "${FILE}.tmp" 2>/dev/null | grep '\['); do
|
for N in $(cat "${FILE}.tmp" 2>/dev/null | grep '\['); do
|
||||||
echo "${N}" >>"${FILE}"
|
echo "${N}" >>"${FILE}"
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon allowdowngrade - ${1}"
|
echo "Installing addon allowdowngrade - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/allowdowngrade.sh /tmpRoot/usr/bin/allowdowngrade.sh
|
cp -pf /usr/bin/allowdowngrade.sh /tmpRoot/usr/bin/allowdowngrade.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/allowdowngrade.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/allowdowngrade.service"
|
||||||
@ -30,7 +30,7 @@ ExecStart=/usr/bin/allowdowngrade.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/allowdowngrade.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/allowdowngrade.service
|
ln -vsf /usr/lib/systemd/system/allowdowngrade.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/allowdowngrade.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon allowdowngrade - ${1}"
|
echo "Installing addon allowdowngrade - ${1}"
|
||||||
|
@ -9,8 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon amepatch - ${1}"
|
echo "Installing addon amepatch - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf /usr/bin/amepatch.sh /tmpRoot/usr/bin/amepatch.sh
|
|
||||||
|
cp -pf /usr/bin/amepatch.sh /tmpRoot/usr/bin/amepatch.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/amepatch.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/amepatch.service"
|
||||||
@ -27,7 +28,7 @@ ExecStart=/usr/bin/amepatch.sh
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/amepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/amepatch.service
|
ln -vsf /usr/lib/systemd/system/amepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/amepatch.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon amepatch - ${1}"
|
echo "Installing addon amepatch - ${1}"
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon arcdns - ${1}"
|
echo "Installing addon arcdns - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/arcdns.php /tmpRoot/usr/bin/arcdns.php
|
cp -pf /usr/bin/arcdns.php /tmpRoot/usr/bin/arcdns.php
|
||||||
cp -vf /usr/bin/arcdns.sh /tmpRoot/usr/bin/arcdns.sh
|
cp -pf /usr/bin/arcdns.sh /tmpRoot/usr/bin/arcdns.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/arcdns.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/arcdns.service"
|
||||||
@ -22,7 +22,6 @@ Description=addon arcdns
|
|||||||
After=multi-user.target
|
After=multi-user.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/usr/bin/arcdns.sh
|
ExecStart=/usr/bin/arcdns.sh
|
||||||
@ -30,7 +29,7 @@ ExecStart=/usr/bin/arcdns.sh
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/arcdns.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arcdns.service
|
ln -vsf /usr/lib/systemd/system/arcdns.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arcdns.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon arcdns - ${1}"
|
echo "Installing addon arcdns - ${1}"
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon codecpatch - ${1}"
|
echo "Installing addon codecpatch - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/codecpatch.sh /tmpRoot/usr/bin/codecpatch.sh
|
cp -pf /usr/bin/codecpatch.sh /tmpRoot/usr/bin/codecpatch.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/codecpatch.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/codecpatch.service"
|
||||||
cat <<EOF >${DEST}
|
cat <<EOF >${DEST}
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=addon codecpatch
|
Description=addon codecpatch
|
||||||
echo "After=syno-volume.target syno-space.target"
|
After=syno-volume.target syno-space.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
@ -29,7 +29,7 @@ ExecStart=/usr/bin/codecpatch.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/codecpatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/codecpatch.service
|
ln -vsf /usr/lib/systemd/system/codecpatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/codecpatch.service
|
||||||
fi
|
fi
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
|
@ -9,19 +9,19 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing cpufreqscalingscaling - ${1}"
|
echo "Installing cpufreqscalingscaling - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf "/usr/sbin/scaling.sh" "/tmpRoot/usr/sbin/scaling.sh"
|
cp -pf "/usr/sbin/scaling.sh" "/tmpRoot/usr/sbin/scaling.sh"
|
||||||
[ ! -f "/tmpRoot/usr/bin/echo" ] && cp -vf /usr/bin/echo /tmpRoot/usr/bin/echo || true
|
[ ! -f "/tmpRoot/usr/bin/echo" ] && cp -pf /usr/bin/echo /tmpRoot/usr/bin/echo || true
|
||||||
cp -f "/usr/lib/modules/acpi_cpufreq.ko" "/tmpRoot/usr/lib/modules/acpi_cpufreq.ko"
|
cp -pf "/usr/lib/modules/acpi_cpufreq.ko" "/tmpRoot/usr/lib/modules/acpi_cpufreq.ko"
|
||||||
[ "${2}" != "schedutil" ] && cp -vf "/usr/lib/modules/cpufreq_${2}.ko" "/tmpRoot/usr/lib/modules/cpufreq_${2}.ko"
|
[ "${2}" != "schedutil" ] && cp -pf "/usr/lib/modules/cpufreq_${2}.ko" "/tmpRoot/usr/lib/modules/cpufreq_${2}.ko"
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||||
cat <<EOF >${DEST}
|
cat <<EOF >${DEST}
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Enable CPU Freq scaling
|
Description=Enable CPU Freq scaling
|
||||||
After=multi-user.target
|
After=syno-volume.target syno-space.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
@ -33,13 +33,13 @@ ExecStart=/usr/sbin/scaling.sh ${2}
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
||||||
|
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert scaling... task to esynoscheduler.db"
|
echo "insert scaling... task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
|
@ -27,10 +27,8 @@ restoreCpuinfo() {
|
|||||||
rm -f "${FILE_JS}" "${FILE_GZ}"
|
rm -f "${FILE_JS}" "${FILE_GZ}"
|
||||||
mv -f "${FILE_GZ}.bak" "${FILE_GZ}"
|
mv -f "${FILE_GZ}.bak" "${FILE_GZ}"
|
||||||
gzip -dc "${FILE_GZ}" >"${FILE_JS}"
|
gzip -dc "${FILE_GZ}" >"${FILE_JS}"
|
||||||
chmod a+r "${FILE_JS}" "${FILE_GZ}"
|
|
||||||
elif [ -f "${FILE_JS}.bak" ]; then
|
elif [ -f "${FILE_JS}.bak" ]; then
|
||||||
mv -f "${FILE_JS}.bak" "${FILE_JS}"
|
mv -f "${FILE_JS}.bak" "${FILE_JS}"
|
||||||
chmod a+r "${FILE_JS}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,16 +99,16 @@ CORES="${CORES:-1}"
|
|||||||
SPEED="${SPEED:-0}"
|
SPEED="${SPEED:-0}"
|
||||||
|
|
||||||
if [ -f "${FILE_GZ}" ]; then
|
if [ -f "${FILE_GZ}" ]; then
|
||||||
[ ! -f "${FILE_GZ}.bak" ] && cp -f "${FILE_GZ}" "${FILE_GZ}.bak" && chmod a+r "${FILE_GZ}.bak"
|
[ ! -f "${FILE_GZ}.bak" ] && cp -pf "${FILE_GZ}" "${FILE_GZ}.bak"
|
||||||
else
|
else
|
||||||
[ ! -f "${FILE_JS}.bak" ] && cp -f "${FILE_JS}" "${FILE_JS}.bak" && chmod a+r "${FILE_JS}.bak"
|
[ ! -f "${FILE_JS}.bak" ] && cp -pf "${FILE_JS}" "${FILE_JS}.bak"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "${FILE_JS}"
|
rm -f "${FILE_JS}"
|
||||||
if [ -f "${FILE_GZ}.bak" ]; then
|
if [ -f "${FILE_GZ}.bak" ]; then
|
||||||
gzip -dc "${FILE_GZ}.bak" >"${FILE_JS}"
|
gzip -dc "${FILE_GZ}.bak" >"${FILE_JS}"
|
||||||
else
|
else
|
||||||
cp -f "${FILE_JS}.bak" "${FILE_JS}"
|
cp -pf "${FILE_JS}.bak" "${FILE_JS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "CPU Info set to: \"TEMP:${TEMP}\" \"${VENDOR}\" \"${FAMILY}\" \"${SERIES}\" \"${CORES}\" \"${SPEED}\""
|
echo "CPU Info set to: \"TEMP:${TEMP}\" \"${VENDOR}\" \"${FAMILY}\" \"${SERIES}\" \"${CORES}\" \"${SPEED}\""
|
||||||
@ -143,7 +141,6 @@ fi
|
|||||||
|
|
||||||
if [ -f "${FILE_GZ}.bak" ]; then
|
if [ -f "${FILE_GZ}.bak" ]; then
|
||||||
gzip -c "${FILE_JS}" >"${FILE_GZ}"
|
gzip -c "${FILE_JS}" >"${FILE_GZ}"
|
||||||
chmod a+r "${FILE_GZ}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon cpuinfo - ${1}"
|
echo "Installing addon cpuinfo - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/cpuinfo.sh /tmpRoot/usr/bin/cpuinfo.sh
|
cp -pf /usr/bin/cpuinfo.sh /tmpRoot/usr/bin/cpuinfo.sh
|
||||||
|
|
||||||
shift
|
shift
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
@ -30,7 +30,7 @@ ExecStart=/usr/bin/cpuinfo.sh $@
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/cpuinfo.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpuinfo.service
|
ln -vsf /usr/lib/systemd/system/cpuinfo.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpuinfo.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon cpuinfo - ${1}"
|
echo "Installing addon cpuinfo - ${1}"
|
||||||
|
@ -37,12 +37,12 @@ function getlog() {
|
|||||||
ls -l /sys/class/scsi_host >"${DEST_PATH}/disk-scsi_host.log" || true
|
ls -l /sys/class/scsi_host >"${DEST_PATH}/disk-scsi_host.log" || true
|
||||||
cat /sys/block/*/device/syno_block_info >"${DEST_PATH}/disk-syno_block_info.log" || true
|
cat /sys/block/*/device/syno_block_info >"${DEST_PATH}/disk-syno_block_info.log" || true
|
||||||
|
|
||||||
[ -f "/addons/addons.sh" ] && cp -f "/addons/addons.sh" "${DEST_PATH}/addons.sh" || true
|
[ -f "/addons/addons.sh" ] && cp -pf "/addons/addons.sh" "${DEST_PATH}/addons.sh" || true
|
||||||
[ -f "/addons/model.dts" ] && cp -f "/addons/model.dts" "${DEST_PATH}/model.dts" || true
|
[ -f "/addons/model.dts" ] && cp -pf "/addons/model.dts" "${DEST_PATH}/model.dts" || true
|
||||||
|
|
||||||
[ -f "/var/log/messages" ] && cp -f "/var/log/messages" "${DEST_PATH}/messages" || true
|
[ -f "/var/log/messages" ] && cp -pf "/var/log/messages" "${DEST_PATH}/messages" || true
|
||||||
[ -f "/var/log/linuxrc.syno.log" ] && cp -f "/var/log/linuxrc.syno.log" "${DEST_PATH}/linuxrc.syno.log" || true
|
[ -f "/var/log/linuxrc.syno.log" ] && cp -pf "/var/log/linuxrc.syno.log" "${DEST_PATH}/linuxrc.syno.log" || true
|
||||||
[ -f "/tmp/installer_sh.log" ] && cp -f "/tmp/installer_sh.log" "${DEST_PATH}/installer_sh.log" || true
|
[ -f "/tmp/installer_sh.log" ] && cp -pf "/tmp/installer_sh.log" "${DEST_PATH}/installer_sh.log" || true
|
||||||
|
|
||||||
sync
|
sync
|
||||||
umount "${WORK_PATH}"
|
umount "${WORK_PATH}"
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Creating service to exec deduplication"
|
echo "Creating service to exec deduplication"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/deduplication.sh /tmpRoot/usr/bin/deduplication.sh
|
cp -pf /usr/bin/deduplication.sh /tmpRoot/usr/bin/deduplication.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/deduplication.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/deduplication.service"
|
||||||
@ -29,7 +29,7 @@ ExecStart=/usr/bin/deduplication.sh -s -e --hdd
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/deduplication.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/deduplication.service
|
ln -vsf /usr/lib/systemd/system/deduplication.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/deduplication.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon deduplication - ${1}"
|
echo "Installing addon deduplication - ${1}"
|
||||||
|
@ -308,7 +308,7 @@ function dtModel() {
|
|||||||
echo "};" >>${DEST}
|
echo "};" >>${DEST}
|
||||||
fi
|
fi
|
||||||
dtc -I dts -O dtb ${DEST} >/etc/model.dtb
|
dtc -I dts -O dtb ${DEST} >/etc/model.dtb
|
||||||
cp -vf /etc/model.dtb /run/model.dtb
|
cp -pf /etc/model.dtb /run/model.dtb
|
||||||
/usr/syno/bin/syno_slot_mapping
|
/usr/syno/bin/syno_slot_mapping
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,9 +453,9 @@ elif [ "${1}" = "late" ]; then
|
|||||||
if [ "$(_get_conf_kv supportportmappingv2)" = "yes" ]; then
|
if [ "$(_get_conf_kv supportportmappingv2)" = "yes" ]; then
|
||||||
echo "Copying /etc.defaults/model.dtb"
|
echo "Copying /etc.defaults/model.dtb"
|
||||||
# copy file
|
# copy file
|
||||||
cp -vf /usr/bin/dtc /tmpRoot/usr/bin/dtc
|
cp -pf /usr/bin/dtc /tmpRoot/usr/bin/dtc
|
||||||
cp -vf /etc/model.dtb /tmpRoot/etc/model.dtb
|
cp -pf /etc/model.dtb /tmpRoot/etc/model.dtb
|
||||||
cp -vf /etc/model.dtb /tmpRoot/etc.defaults/model.dtb
|
cp -pf /etc/model.dtb /tmpRoot/etc.defaults/model.dtb
|
||||||
else
|
else
|
||||||
echo "Adjust maxdisks and internalportcfg automatically"
|
echo "Adjust maxdisks and internalportcfg automatically"
|
||||||
# sysfs is unpopulated here, get the values from junior synoinfo.conf
|
# sysfs is unpopulated here, get the values from junior synoinfo.conf
|
||||||
@ -471,8 +471,8 @@ elif [ "${1}" = "late" ]; then
|
|||||||
_set_conf_kv hd "esataportcfg" "${ESATAPORTCFG}"
|
_set_conf_kv hd "esataportcfg" "${ESATAPORTCFG}"
|
||||||
_set_conf_kv hd "internalportcfg" "${INTERNALPORTCFG}"
|
_set_conf_kv hd "internalportcfg" "${INTERNALPORTCFG}"
|
||||||
# nvme
|
# nvme
|
||||||
cp -vf /etc/extensionPorts /tmpRoot/etc/extensionPorts
|
cp -pf /etc/extensionPorts /tmpRoot/etc/extensionPorts
|
||||||
cp -vf /etc/extensionPorts /tmpRoot/etc.defaults/extensionPorts
|
cp -pf /etc/extensionPorts /tmpRoot/etc.defaults/extensionPorts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MAXDISKS=$(_get_conf_kv maxdisks)
|
MAXDISKS=$(_get_conf_kv maxdisks)
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon synoconfbkp - ${1}"
|
echo "Installing addon synoconfbkp - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/dsmconfigbackup.sh /tmpRoot/usr/bin/dsmconfigbackup.sh
|
cp -pf /usr/bin/dsmconfigbackup.sh /tmpRoot/usr/bin/dsmconfigbackup.sh
|
||||||
|
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert synoconfbkp task to esynoscheduler.db"
|
echo "insert synoconfbkp task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
|
Binary file not shown.
@ -34,6 +34,9 @@ elif [ "${1}" = "modules" ]; then
|
|||||||
sleep 10
|
sleep 10
|
||||||
# Remove from memory to not conflict with RAID mount scripts
|
# Remove from memory to not conflict with RAID mount scripts
|
||||||
/usr/bin/killall udevd
|
/usr/bin/killall udevd
|
||||||
|
# modprobe pcspeaker, pcspkr
|
||||||
|
/usr/sbin/modprobe pcspeaker
|
||||||
|
/usr/sbin/modprobe pcspkr
|
||||||
# Remove kvm module
|
# Remove kvm module
|
||||||
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm_intel && /usr/sbin/modprobe -r kvm_intel || true # kvm-intel.ko
|
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm_intel && /usr/sbin/modprobe -r kvm_intel || true # kvm-intel.ko
|
||||||
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm_amd && /usr/sbin/modprobe -r kvm_amd || true # kvm-amd.ko
|
/usr/sbin/lsmod 2>/dev/null | grep -q ^kvm_amd && /usr/sbin/modprobe -r kvm_amd || true # kvm-amd.ko
|
||||||
@ -51,12 +54,12 @@ elif [ "${1}" = "late" ]; then
|
|||||||
if cat /proc/version 2>/dev/null | grep -q 'RR@RR'; then
|
if cat /proc/version 2>/dev/null | grep -q 'RR@RR'; then
|
||||||
if [ -d /tmpRoot/usr/lib/modules.bak ]; then
|
if [ -d /tmpRoot/usr/lib/modules.bak ]; then
|
||||||
/tmpRoot/bin/rm -rf /tmpRoot/usr/lib/modules
|
/tmpRoot/bin/rm -rf /tmpRoot/usr/lib/modules
|
||||||
/tmpRoot/bin/cp -rf /tmpRoot/usr/lib/modules.bak /tmpRoot/usr/lib/modules
|
/tmpRoot/bin/cp -rpf /tmpRoot/usr/lib/modules.bak /tmpRoot/usr/lib/modules
|
||||||
else
|
else
|
||||||
echo "Custom - backup modules."
|
echo "Custom - backup modules."
|
||||||
/tmpRoot/bin/cp -rf /tmpRoot/usr/lib/modules /tmpRoot/usr/lib/modules.bak
|
/tmpRoot/bin/cp -rpf /tmpRoot/usr/lib/modules /tmpRoot/usr/lib/modules.bak
|
||||||
fi
|
fi
|
||||||
/tmpRoot/bin/cp -rf /usr/lib/modules/* /tmpRoot/usr/lib/modules
|
/tmpRoot/bin/cp -rpf /usr/lib/modules/* /tmpRoot/usr/lib/modules
|
||||||
echo "true" >/tmp/modulesChange
|
echo "true" >/tmp/modulesChange
|
||||||
else
|
else
|
||||||
if [ -d /tmpRoot/usr/lib/modules.bak ]; then
|
if [ -d /tmpRoot/usr/lib/modules.bak ]; then
|
||||||
|
@ -13,8 +13,8 @@ if [ -f "${FILE}" ]; then
|
|||||||
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
||||||
echo "usb.ids download error!"
|
echo "usb.ids download error!"
|
||||||
else
|
else
|
||||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
[ ! -f "${FILE}.bak" ] && cp -pf "${FILE}" "${FILE}.bak"
|
||||||
cp -f "/tmp/usb.map" "${FILE}"
|
cp -pf "/tmp/usb.map" "${FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ if [ -f "${FILE}" ]; then
|
|||||||
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
|
||||||
echo "ca-certificates.crt download error!"
|
echo "ca-certificates.crt download error!"
|
||||||
else
|
else
|
||||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
[ ! -f "${FILE}.bak" ] && cp -pf "${FILE}" "${FILE}.bak"
|
||||||
cp -f "/tmp/cacert.pem" "${FILE}"
|
cp -pf "/tmp/cacert.pem" "${FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon expands - ${1}"
|
echo "Installing addon expands - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/expands.sh /tmpRoot/usr/bin/expands.sh
|
cp -pf /usr/bin/expands.sh /tmpRoot/usr/bin/expands.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/expands.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/expands.service"
|
||||||
@ -29,7 +29,7 @@ ExecStart=/usr/bin/expands.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/expands.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service
|
ln -vsf /usr/lib/systemd/system/expands.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon expands - ${1}"
|
echo "Installing addon expands - ${1}"
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon hdddb - ${1}"
|
echo "Installing addon hdddb - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/hdddb.sh /tmpRoot/usr/bin/hdddb.sh
|
cp -pf /usr/bin/hdddb.sh /tmpRoot/usr/bin/hdddb.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/hdddb.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/hdddb.service"
|
||||||
@ -29,7 +29,7 @@ ExecStart=/usr/bin/hdddb.sh -nrwpeS
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/hdddb.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/hdddb.service
|
ln -vsf /usr/lib/systemd/system/hdddb.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/hdddb.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon hdddb - ${1}"
|
echo "Installing addon hdddb - ${1}"
|
||||||
|
@ -38,8 +38,7 @@ if [ "${1}" = "patches" ]; then
|
|||||||
GPU_DEF="86800000923e0000"
|
GPU_DEF="86800000923e0000"
|
||||||
GPU_BIN="${GPU:2:2}${GPU:0:2}0000${GPU:6:2}${GPU:4:2}0000"
|
GPU_BIN="${GPU:2:2}${GPU:0:2}0000${GPU:6:2}${GPU:4:2}0000"
|
||||||
echo "GPU:${GPU} GPU_BIN:${GPU_BIN}"
|
echo "GPU:${GPU} GPU_BIN:${GPU_BIN}"
|
||||||
cp -vf "${KO_FILE}" "${KO_FILE}.bak"
|
cp -pf "${KO_FILE}" "${KO_FILE}.tmp"
|
||||||
cp -f "${KO_FILE}" "${KO_FILE}.tmp"
|
|
||||||
xxd -c $(xxd -p "${KO_FILE}.tmp" 2>/dev/null | wc -c) -p "${KO_FILE}.tmp" 2>/dev/null |
|
xxd -c $(xxd -p "${KO_FILE}.tmp" 2>/dev/null | wc -c) -p "${KO_FILE}.tmp" 2>/dev/null |
|
||||||
sed "s/${GPU_DEF}/${GPU_BIN}/; s/308201f706092a86.*70656e6465647e0a//" |
|
sed "s/${GPU_DEF}/${GPU_BIN}/; s/308201f706092a86.*70656e6465647e0a//" |
|
||||||
xxd -r -p >"${KO_FILE}" 2>/dev/null
|
xxd -r -p >"${KO_FILE}" 2>/dev/null
|
||||||
@ -49,11 +48,11 @@ if [ "${1}" = "patches" ]; then
|
|||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon i915 - ${1}"
|
echo "Installing addon i915 - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
KO_FILE="/tmpRoot/usr/lib/modules/i915.ko"
|
KO_FILE="/tmpRoot/usr/lib/modules/i915.ko"
|
||||||
[ ! -f "${KO_FILE}.bak" ] && cp -vf "${KO_FILE}" "${KO_FILE}.bak"
|
[ ! -f "${KO_FILE}.bak" ] && cp -pf "${KO_FILE}" "${KO_FILE}.bak"
|
||||||
cp -vf "/usr/lib/modules/i915.ko" "${KO_FILE}"
|
cp -pf "/usr/lib/modules/i915.ko" "${KO_FILE}"
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon i915 - ${1}"
|
echo "Installing addon i915 - ${1}"
|
||||||
|
|
||||||
|
@ -9,17 +9,17 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon ledcontrol - ${1}"
|
echo "Installing addon ledcontrol - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/ledcontrol.sh /tmpRoot/usr/bin/ledcontrol.sh
|
cp -pf /usr/bin/ledcontrol.sh /tmpRoot/usr/bin/ledcontrol.sh
|
||||||
cp -vf /usr/bin/ugreen_leds_cli /tmpRoot/usr/bin/ugreen_leds_cli
|
cp -pf /usr/bin/ugreen_leds_cli /tmpRoot/usr/bin/ugreen_leds_cli
|
||||||
cp -vf /usr/bin/ugreen-diskiomon /tmpRoot/usr/bin/ugreen-diskiomon
|
cp -pf /usr/bin/ugreen-diskiomon /tmpRoot/usr/bin/ugreen-diskiomon
|
||||||
cp -vf /usr/bin/ugreen-netdevmon /tmpRoot/usr/bin/ugreen-netdevmon
|
cp -pf /usr/bin/ugreen-netdevmon /tmpRoot/usr/bin/ugreen-netdevmon
|
||||||
cp -vf /usr/bin/ugreen-probe-leds /tmpRoot/usr/bin/ugreen-probe-leds
|
cp -pf /usr/bin/ugreen-probe-leds /tmpRoot/usr/bin/ugreen-probe-leds
|
||||||
cp -vf /usr/bin/led.conf /tmpRoot/usr/bin/led.conf
|
cp -pf /usr/bin/led.conf /tmpRoot/usr/bin/led.conf
|
||||||
cp -vf /usr/bin/modules/i2c-algo-bit.ko /tmpRoot/usr/bin/modules/i2c-algo-bit.ko
|
cp -pf /usr/bin/modules/i2c-algo-bit.ko /tmpRoot/usr/bin/modules/i2c-algo-bit.ko
|
||||||
cp -vf /usr/lib/modules/i2c-i801.ko /tmpRoot/usr/lib/modules/i2c-i801.ko
|
cp -pf /usr/lib/modules/i2c-i801.ko /tmpRoot/usr/lib/modules/i2c-i801.ko
|
||||||
cp -vf /usr/lib/modules/i2c-smbus.ko /tmpRoot/usr/lib/modules/i2c-smbus.ko
|
cp -pf /usr/lib/modules/i2c-smbus.ko /tmpRoot/usr/lib/modules/i2c-smbus.ko
|
||||||
|
|
||||||
insmod i2c-algo-bit
|
insmod i2c-algo-bit
|
||||||
insmod i2c-i801
|
insmod i2c-i801
|
||||||
@ -45,7 +45,7 @@ ExecStart=/usr/bin/ledcontrol.sh
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/ledcontrol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service
|
ln -vsf /usr/lib/systemd/system/ledcontrol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon ledcontrol - ${1}"
|
echo "Installing addon ledcontrol - ${1}"
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon lsiutil - ${1}"
|
echo "Installing addon lsiutil - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/sbin/lsiutil /tmpRoot/usr/sbin/lsiutil
|
cp -pf /usr/sbin/lsiutil /tmpRoot/usr/sbin/lsiutil
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon lsiutil - ${1}"
|
echo "Installing addon lsiutil - ${1}"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ if [ "${1}" = "early" ]; then
|
|||||||
|
|
||||||
# [CREATE][failed] Raidtool initsys
|
# [CREATE][failed] Raidtool initsys
|
||||||
SO_FILE="/usr/syno/bin/scemd"
|
SO_FILE="/usr/syno/bin/scemd"
|
||||||
[ ! -f "${SO_FILE}.bak" ] && cp -vf "${SO_FILE}" "${SO_FILE}.bak"
|
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
||||||
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
||||||
sed "s/2d6520302e39/2d6520312e32/" |
|
sed "s/2d6520302e39/2d6520312e32/" |
|
||||||
@ -177,7 +177,7 @@ elif [ "${1}" = "late" ]; then
|
|||||||
else
|
else
|
||||||
echo "CPU supports CPU Performance Scaling, enabling"
|
echo "CPU supports CPU Performance Scaling, enabling"
|
||||||
sed -i 's/^# acpi-cpufreq/acpi-cpufreq/g' /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf
|
sed -i 's/^# acpi-cpufreq/acpi-cpufreq/g' /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf
|
||||||
cp -vf /usr/lib/modules/cpufreq_* /tmpRoot/usr/lib/modules/
|
cp -pf /usr/lib/modules/cpufreq_* /tmpRoot/usr/lib/modules/
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
modprobe -r acpi-cpufreq
|
modprobe -r acpi-cpufreq
|
||||||
@ -254,30 +254,30 @@ elif [ "${1}" = "late" ]; then
|
|||||||
mkdir -p /tmpRoot/etc/sysconfig/network-scripts
|
mkdir -p /tmpRoot/etc/sysconfig/network-scripts
|
||||||
mkdir -p /tmpRoot/etc.defaults/sysconfig/network-scripts
|
mkdir -p /tmpRoot/etc.defaults/sysconfig/network-scripts
|
||||||
for I in $(ls /etc/sysconfig/network-scripts/ifcfg-eth*); do
|
for I in $(ls /etc/sysconfig/network-scripts/ifcfg-eth*); do
|
||||||
[ ! -f "/tmpRoot/${I}" ] && cp -vf "${I}" "/tmpRoot/${I}"
|
[ ! -f "/tmpRoot/${I}" ] && cp -pf "${I}" "/tmpRoot/${I}"
|
||||||
[ ! -f "/tmpRoot/${I/etc/etc.defaults}" ] && cp -vf "${I}" "/tmpRoot/${I/etc/etc.defaults}"
|
[ ! -f "/tmpRoot/${I/etc/etc.defaults}" ] && cp -pf "${I}" "/tmpRoot/${I/etc/etc.defaults}"
|
||||||
done
|
done
|
||||||
if grep -q 'network.' /proc/cmdline && [ -f "/etc/ifcfgs" ]; then
|
if grep -q 'network.' /proc/cmdline && [ -f "/etc/ifcfgs" ]; then
|
||||||
for ETH in $(cat /etc/ifcfgs); do
|
for ETH in $(cat /etc/ifcfgs); do
|
||||||
echo "Copy ifcfg-${ETH}"
|
echo "Copy ifcfg-${ETH}"
|
||||||
if [ -f "/etc/sysconfig/network-scripts/ifcfg-${ETH}" ]; then
|
if [ -f "/etc/sysconfig/network-scripts/ifcfg-${ETH}" ]; then
|
||||||
rm -vf /tmpRoot/etc/sysconfig/network-scripts/ifcfg-* /tmpRoot/etc.defaults/sysconfig/network-scripts/ifcfg-*
|
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 -pf /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/
|
cp -pf /etc/sysconfig/network-scripts/ifcfg-${ETH} /tmpRoot/etc.defaults/sysconfig/network-scripts/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# syslog-ng
|
# syslog-ng
|
||||||
if [ -f /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf ]; then
|
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
|
cp -pfp /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
|
sed -i 's/destination(d_scemd)/flags(final)/g' /tmpRoot/etc.defaults/syslog-ng/patterndb.d/scemd.conf
|
||||||
else
|
else
|
||||||
echo "scemd.conf does not exist."
|
echo "scemd.conf does not exist."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /tmpRoot/etc.defaults/syslog-ng/patterndb.d/synosystemd.conf ]; then
|
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
|
cp -pfp /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
|
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
|
else
|
||||||
echo "synosystemd.conf does not exist."
|
echo "synosystemd.conf does not exist."
|
||||||
@ -290,6 +290,6 @@ elif [ "${1}" = "late" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy Loader Reboot
|
# Copy Loader Reboot
|
||||||
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin/loader-reboot.sh
|
cp -pf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin/loader-reboot.sh
|
||||||
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin/grub-editenv
|
cp -pf /usr/bin/grub-editenv /tmpRoot/usr/bin/grub-editenv
|
||||||
fi
|
fi
|
||||||
|
@ -1,369 +0,0 @@
|
|||||||
#!/usr/bin/env ash
|
|
||||||
#
|
|
||||||
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the MIT License.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
# SYNC consts.sh
|
|
||||||
PART1_PATH="/mnt/p1"
|
|
||||||
PART2_PATH="/mnt/p2"
|
|
||||||
PART3_PATH="/mnt/p3"
|
|
||||||
#DSMROOT_PATH="/mnt/dsmroot"
|
|
||||||
TMP_PATH="/tmp"
|
|
||||||
|
|
||||||
#UNTAR_PAT_PATH="${TMP_PATH}/pat"
|
|
||||||
#RAMDISK_PATH="${TMP_PATH}/ramdisk"
|
|
||||||
#LOG_FILE="${TMP_PATH}/log.txt"
|
|
||||||
|
|
||||||
USER_CONFIG_FILE="${PART1_PATH}/user-config.yml"
|
|
||||||
GRUB_PATH="${PART1_PATH}/boot/grub"
|
|
||||||
|
|
||||||
ORI_ZIMAGE_FILE="${PART2_PATH}/zImage"
|
|
||||||
ORI_RDGZ_FILE="${PART2_PATH}/rd.gz"
|
|
||||||
|
|
||||||
ARC_BZIMAGE_FILE="${PART3_PATH}/bzImage-arc"
|
|
||||||
ARC_RAMDISK_FILE="${PART3_PATH}/initrd-arc"
|
|
||||||
MOD_ZIMAGE_FILE="${PART3_PATH}/zImage-dsm"
|
|
||||||
MOD_RDGZ_FILE="${PART3_PATH}/initrd-dsm"
|
|
||||||
|
|
||||||
CKS_PATH="${PART3_PATH}/custom"
|
|
||||||
LKMS_PATH="${PART3_PATH}/lkms"
|
|
||||||
ADDONS_PATH="${PART3_PATH}/addons"
|
|
||||||
MODULES_PATH="${PART3_PATH}/modules"
|
|
||||||
USER_UP_PATH="${PART3_PATH}/users"
|
|
||||||
SCRIPTS_PATH="${PART3_PATH}/scripts"
|
|
||||||
|
|
||||||
# Modify KVER for Epyc7002
|
|
||||||
if [ "${PLATFORM}" == "epyc7002" ]; then
|
|
||||||
KVERP="${PRODUCTVER}-${KVER}"
|
|
||||||
else
|
|
||||||
KVERP="${KVER}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# SYNC configFile.sh
|
|
||||||
|
|
||||||
# Read key value from yaml config file
|
|
||||||
# 1 - Path of key
|
|
||||||
# 2 - Path of yaml config file
|
|
||||||
# Return Value
|
|
||||||
function readConfigKey() {
|
|
||||||
RESULT=$(yq eval '.'${1}' | explode(.)' "${2}" 2>/dev/null)
|
|
||||||
[ "${RESULT}" == "null" ] && echo "" || echo ${RESULT}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read Entries as map(key=value) from yaml config file
|
|
||||||
# 1 - Path of key
|
|
||||||
# 2 - Path of yaml config file
|
|
||||||
# Returns map of values
|
|
||||||
function readConfigMap() {
|
|
||||||
yq eval '.'${1}' | explode(.) | to_entries | map([.key, .value] | join(": ")) | .[]' "${2}" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Read an array from yaml config file
|
|
||||||
# 1 - Path of key
|
|
||||||
# 2 - Path of yaml config file
|
|
||||||
# Returns array/map of values
|
|
||||||
function readConfigArray() {
|
|
||||||
yq eval '.'${1}'[]' "${2}" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Write to yaml config file
|
|
||||||
# 1 - Path of Key
|
|
||||||
# 2 - Value
|
|
||||||
# 3 - Path of yaml config file
|
|
||||||
function writeConfigKey() {
|
|
||||||
[ "${2}" = "{}" ] && yq eval '.'${1}' = {}' --inplace "${3}" 2>/dev/null || yq eval '.'${1}' = "'"${2}"'"' --inplace "${3}" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Return list of all modules available
|
|
||||||
# 1 - Platform
|
|
||||||
# 2 - Kernel Version
|
|
||||||
function getAllModules() {
|
|
||||||
local PLATFORM=${1}
|
|
||||||
local KVER=${2}
|
|
||||||
|
|
||||||
if [ -z "${PLATFORM}" -o -z "${KVERP}" ]; then
|
|
||||||
echo ""
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# Unzip modules for temporary folder
|
|
||||||
rm -rf "${TMP_PATH}/modules"
|
|
||||||
mkdir -p "${TMP_PATH}/modules"
|
|
||||||
local KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
|
||||||
if [ "${KERNEL}" = "custom" ]; then
|
|
||||||
tar -zxf "${CKS_PATH}/modules-${PLATFORM}-${KVERP}.tgz" -C "${TMP_PATH}/modules"
|
|
||||||
else
|
|
||||||
tar -zxf "${MODULES_PATH}/${PLATFORM}-${KVERP}.tgz" -C "${TMP_PATH}/modules"
|
|
||||||
fi
|
|
||||||
# Get list of all modules
|
|
||||||
for F in $(ls ${TMP_PATH}/modules/*.ko 2>/dev/null); do
|
|
||||||
local X=$(basename ${F})
|
|
||||||
local M=${X:0:-3}
|
|
||||||
local DESC=$(modinfo ${F} 2>/dev/null | awk -F':' '/description:/{ print $2}' | awk '{sub(/^[ ]+/,""); print}')
|
|
||||||
[ -z "${DESC}" ] && DESC="${X}"
|
|
||||||
echo "${M} \"${DESC}\""
|
|
||||||
done
|
|
||||||
rm -rf "${TMP_PATH}/modules"
|
|
||||||
}
|
|
||||||
|
|
||||||
# SYNC menu.sh
|
|
||||||
|
|
||||||
# 1 - update.zip path
|
|
||||||
# 2 - progress file path
|
|
||||||
function updateARC() {
|
|
||||||
local UPDATE_FILE="${1:-"/tmp/update.zip"}"
|
|
||||||
local PROGRESS_FILE="${2:-"/tmp/arc_update_progress"}"
|
|
||||||
|
|
||||||
echo '{"progress": "0", "progressmsg": "Update ARC ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ ! -f "${UPDATE_FILE}" ]; then
|
|
||||||
echo '{"progress": "-1", "progressmsg": "Update file not found!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "10", "progressmsg": "Extracting update file ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
mkdir -p "${TMP_PATH}/update"
|
|
||||||
unzip -oq "${UPDATE_FILE}" -d "${TMP_PATH}/update"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-2", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# Check checksums
|
|
||||||
echo '{"progress": "20", "progressmsg": "Check checksums ..."}' >"${PROGRESS_FILE}"
|
|
||||||
(cd "${TMP_PATH}/update" && sha256sum --status -c sha256sum)
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-3", "progressmsg": "Checksum do not match!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# Check conditions
|
|
||||||
echo '{"progress": "30", "progressmsg": "Check conditions ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ -f "${TMP_PATH}/update/update-check.sh" ]; then
|
|
||||||
cat "${TMP_PATH}/update/update-check.sh" | bash
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-4", "progressmsg": "Update check failed, The current version does not support upgrading to the latest version!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo '{"progress": "40", "progressmsg": "Check disk space ..."}' >"${PROGRESS_FILE}"
|
|
||||||
SIZENEW=0
|
|
||||||
SIZEOLD=0
|
|
||||||
while IFS=': ' read KEY VALUE; do
|
|
||||||
if [ "${KEY: -1}" = "/" ]; then
|
|
||||||
rm -Rf "${TMP_PATH}/update/${VALUE}"
|
|
||||||
mkdir -p "${TMP_PATH}/update/${VALUE}"
|
|
||||||
tar -zxf "${TMP_PATH}/update/$(basename "${KEY}").tgz" -C "${TMP_PATH}/update/${VALUE}"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-5", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
rm "${TMP_PATH}/update/$(basename "${KEY}").tgz"
|
|
||||||
else
|
|
||||||
mkdir -p "${TMP_PATH}/update/$(dirname "${VALUE}")"
|
|
||||||
mv -f "${TMP_PATH}/update/$(basename "${KEY}")" "${TMP_PATH}/update/${VALUE}"
|
|
||||||
fi
|
|
||||||
SIZENEW=$((${SIZENEW} + $(du -sm "${TMP_PATH}/update/${VALUE}" 2>/dev/null | awk '{print $1}')))
|
|
||||||
SIZEOLD=$((${SIZEOLD} + $(du -sm "${VALUE}" 2>/dev/null | awk '{print $1}')))
|
|
||||||
done < <(readConfigMap "replace" "${TMP_PATH}/update/update-list.yml")
|
|
||||||
|
|
||||||
SIZESPL=$(df -m ${PART3_PATH} 2>/dev/null | awk 'NR==2 {print $4}')
|
|
||||||
if [ ${SIZENEW:-0} -ge $((${SIZEOLD:-0} + ${SIZESPL:-0})) ]; then
|
|
||||||
MSG="$(printf "Failed to install due to insufficient remaning disk space on local hard drive, consider reallocate your disk %s with at least %sM." "${PART3_PATH}" "$((${SIZENEW} - ${SIZEOLD} - ${SIZESPL}))")"
|
|
||||||
echo '{"progress": "-6", "progressmsg": "'${MSG}'"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
if [ -f "${TMP_PATH}/update/update-list.yml" ]; then
|
|
||||||
# Process update-list.yml
|
|
||||||
echo '{"progress": "50", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
while read F; do
|
|
||||||
[ -f "${F}" ] && rm -f "${F}"
|
|
||||||
[ -d "${F}" ] && rm -Rf "${F}"
|
|
||||||
done < <(readConfigArray "remove" "${TMP_PATH}/update/update-list.yml")
|
|
||||||
|
|
||||||
echo '{"progress": "60", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
while IFS=': ' read KEY VALUE; do
|
|
||||||
if [ "${KEY: -1}" = "/" ]; then
|
|
||||||
rm -Rf "${VALUE}"
|
|
||||||
mkdir -p "${VALUE}"
|
|
||||||
cp -Rf "${TMP_PATH}/update/${VALUE}"/* "${VALUE}"
|
|
||||||
if [ "$(realpath "${VALUE}")" = "$(realpath "${MODULES_PATH}")" ]; then
|
|
||||||
if [ -n "${MODEL}" -a -n "${PRODUCTVER}" ]; then
|
|
||||||
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${WORK_PATH}/platforms.yml")"
|
|
||||||
KPRE="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kpre" "${WORK_PATH}/platforms.yml")"
|
|
||||||
if [ -n "${PLATFORM}" -a -n "${KVERP}" ]; then
|
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
|
||||||
while read ID DESC; do
|
|
||||||
writeConfigKey "modules.\"${ID}\"" "" "${USER_CONFIG_FILE}"
|
|
||||||
done < <(getAllModules "${PLATFORM}" "${KVERP}")
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
mkdir -p "$(dirname "${VALUE}")"
|
|
||||||
cp -f "${TMP_PATH}/update/${VALUE}" "${VALUE}"
|
|
||||||
fi
|
|
||||||
done < <(readConfigMap "replace" "${TMP_PATH}/update/update-list.yml")
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
echo '{"progress": "90", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
fi
|
|
||||||
touch ${PART1_PATH}/.build
|
|
||||||
sync
|
|
||||||
echo '{"progress": "100", "progressmsg": "Arc updated success!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# 1 - update.zip path
|
|
||||||
# 2 - progress file path
|
|
||||||
function updateAddons() {
|
|
||||||
local UPDATE_FILE="${1:-"/tmp/addons.zip"}"
|
|
||||||
local PROGRESS_FILE="${2:-"/tmp/arc_update_progress"}"
|
|
||||||
|
|
||||||
echo '{"progress": "0", "progressmsg": "Update Addons ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ ! -f "${UPDATE_FILE}" ]; then
|
|
||||||
echo '{"progress": "-1", "progressmsg": "Update file not found!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "10", "progressmsg": "Extracting update file ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
mkdir -p "${TMP_PATH}/update"
|
|
||||||
unzip -oq "${UPDATE_FILE}" -d "${TMP_PATH}/update"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-2", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for PKG in $(ls ${TMP_PATH}/update/*.addon 2>/dev/null); do
|
|
||||||
ADDON=$(basename ${PKG} .addon)
|
|
||||||
rm -rf "${TMP_PATH}/update/${ADDON}"
|
|
||||||
mkdir -p "${TMP_PATH}/update/${ADDON}"
|
|
||||||
tar -xaf "${PKG}" -C "${TMP_PATH}/update/${ADDON}"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-3", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
rm -f "${PKG}"
|
|
||||||
done
|
|
||||||
SIZENEW="$(du -sm "${TMP_PATH}/update" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZEOLD="$(du -sm "${ADDONS_PATH}" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZESPL=$(df -m "${ADDONS_PATH}" 2>/dev/null | awk 'NR==2 {print $4}')
|
|
||||||
if [ ${SIZENEW:-0} -ge $((${SIZEOLD:-0} + ${SIZESPL:-0})) ]; then
|
|
||||||
MSG="$(printf "Failed to install due to insufficient remaning disk space on local hard drive, consider reallocate your disk %s with at least %sM." "$(dirname "${ADDONS_PATH}")" "$((${SIZENEW} - ${SIZEOLD} - ${SIZESPL}))")"
|
|
||||||
echo '{"progress": "-3", "progressmsg": "'${MSG}'"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "20", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -Rf "${ADDONS_PATH}/"*
|
|
||||||
cp -Rf "${TMP_PATH}/update/"* "${ADDONS_PATH}/"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
echo '{"progress": "90", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
touch ${PART1_PATH}/.build
|
|
||||||
sync
|
|
||||||
echo '{"progress": "100", "progressmsg": "Addons updated success!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# 1 - update.zip path
|
|
||||||
# 2 - progress file path
|
|
||||||
function updateModules() {
|
|
||||||
local UPDATE_FILE="${1:-"/tmp/modules.zip"}"
|
|
||||||
local PROGRESS_FILE="${2:-"/tmp/arc_update_progress"}"
|
|
||||||
|
|
||||||
echo '{"progress": "0", "progressmsg": "Update Modules ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ ! -f "${UPDATE_FILE}" ]; then
|
|
||||||
echo '{"progress": "-1", "progressmsg": "Update file not found!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "10", "progressmsg": "Extracting update file ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
mkdir -p "${TMP_PATH}/update"
|
|
||||||
unzip -oq "${UPDATE_FILE}" -d "${TMP_PATH}/update"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-2", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SIZENEW="$(du -sm "${TMP_PATH}/update" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZEOLD="$(du -sm "${MODULES_PATH}" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZESPL=$(df -m "${MODULES_PATH}" 2>/dev/null | awk 'NR==2 {print $4}')
|
|
||||||
if [ ${SIZENEW:-0} -ge $((${SIZEOLD:-0} + ${SIZESPL:-0})) ]; then
|
|
||||||
MSG="$(printf "Failed to install due to insufficient remaning disk space on local hard drive, consider reallocate your disk %s with at least %sM." "$(dirname "${MODULES_PATH}")" "$((${SIZENEW} - ${SIZEOLD} - ${SIZESPL}))")"
|
|
||||||
echo '{"progress": "-3", "progressmsg": "'${MSG}'"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "20", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${MODULES_PATH}/"*
|
|
||||||
cp -rf "${TMP_PATH}/update/"* "${MODULES_PATH}/"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-2", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "30", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ -n "${MODEL}" -a -n "${PRODUCTVER}" ]; then
|
|
||||||
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${WORK_PATH}/platforms.yml")"
|
|
||||||
# Modify KVER for Epyc7002
|
|
||||||
if [ "${PLATFORM}" == "epyc7002" ]; then
|
|
||||||
KVERP="${PRODUCTVER}-${KVER}"
|
|
||||||
else
|
|
||||||
KVERP="${KVER}"
|
|
||||||
fi
|
|
||||||
if [ -n "${PLATFORM}" -a -n "${KVERP}" ]; then
|
|
||||||
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
|
|
||||||
while read ID DESC; do
|
|
||||||
writeConfigKey "modules.\"${ID}\"" "" "${USER_CONFIG_FILE}"
|
|
||||||
done < <(getAllModules "${PLATFORM}" "${KVERP}")
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo '{"progress": "90", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
touch ${PART1_PATH}/.build
|
|
||||||
sync
|
|
||||||
echo '{"progress": "100", "progressmsg": "Modules updated success!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# 1 - update.zip path
|
|
||||||
# 2 - progress file path
|
|
||||||
function updateLKMs() {
|
|
||||||
local UPDATE_FILE="${1:-"/tmp/rp-lkms.zip"}"
|
|
||||||
local PROGRESS_FILE="${2:-"/tmp/arc_update_progress"}"
|
|
||||||
|
|
||||||
echo '{"progress": "0", "progressmsg": "Update LKMs ..."}' >"${PROGRESS_FILE}"
|
|
||||||
if [ ! -f "${UPDATE_FILE}" ]; then
|
|
||||||
echo '{"progress": "-1", "progressmsg": "Update file not found!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "10", "progressmsg": "Extracting update file ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
mkdir -p "${TMP_PATH}/update"
|
|
||||||
unzip -oq "${UPDATE_FILE}" -d "${TMP_PATH}/update"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo '{"progress": "-2", "progressmsg": "Update file unzip failed!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SIZENEW="$(du -sm "${TMP_PATH}/update" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZEOLD="$(du -sm "${LKMS_PATH}" 2>/dev/null | awk '{print $1}')"
|
|
||||||
SIZESPL=$(df -m "${LKMS_PATH}" 2>/dev/null | awk 'NR==2 {print $4}')
|
|
||||||
if [ ${SIZENEW:-0} -ge $((${SIZEOLD:-0} + ${SIZESPL:-0})) ]; then
|
|
||||||
MSG="$(printf "Failed to install due to insufficient remaning disk space on local hard drive, consider reallocate your disk %s with at least %sM." "$(dirname "${LKMS_PATH}")" "$((${SIZENEW} - ${SIZEOLD} - ${SIZESPL}))")"
|
|
||||||
echo '{"progress": "-3", "progressmsg": "'${MSG}'"}' >"${PROGRESS_FILE}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
echo '{"progress": "20", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
rm -rf "${LKMS_PATH}/"*
|
|
||||||
cp -rf "${TMP_PATH}/update/"* "${LKMS_PATH}/"
|
|
||||||
rm -rf "${TMP_PATH}/update"
|
|
||||||
echo '{"progress": "90", "progressmsg": "Process update ..."}' >"${PROGRESS_FILE}"
|
|
||||||
touch ${PART1_PATH}/.build
|
|
||||||
sync
|
|
||||||
echo '{"progress": "100", "progressmsg": "LKMs updated success!"}' >"${PROGRESS_FILE}"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
WORK_PATH="/tmp/initrd/opt/arc"
|
|
||||||
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
|
|
||||||
MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
|
|
||||||
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
|
||||||
|
|
||||||
$@
|
|
@ -9,20 +9,19 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon mountloader - ${1}"
|
echo "Installing addon mountloader - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/yq /tmpRoot/usr/bin/yq
|
cp -pf /usr/bin/yq /tmpRoot/usr/bin/yq
|
||||||
cp -vf /usr/bin/cpio /tmpRoot/usr/bin/cpio
|
cp -pf /usr/bin/cpio /tmpRoot/usr/bin/cpio
|
||||||
cp -vf /usr/bin/unzip /tmpRoot/usr/bin/unzip
|
cp -pf /usr/bin/unzip /tmpRoot/usr/bin/unzip
|
||||||
cp -vf /usr/bin/arc-update.sh /tmpRoot/usr/bin/arc-update.sh
|
cp -pf /usr/bin/arc-loaderdisk.sh /tmpRoot/usr/bin/arc-loaderdisk.sh
|
||||||
cp -vf /usr/bin/arc-loaderdisk.sh /tmpRoot/usr/bin/arc-loaderdisk.sh
|
|
||||||
|
|
||||||
rm -f /tmpRoot/usr/arc/.mountloader
|
rm -f /tmpRoot/usr/arc/.mountloader
|
||||||
|
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert mountloader task to esynoscheduler.db"
|
echo "insert mountloader task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
@ -38,7 +37,6 @@ elif [ "${1}" = "uninstall" ]; then
|
|||||||
#rm -f "/tmpRoot/usr/bin/yq"
|
#rm -f "/tmpRoot/usr/bin/yq"
|
||||||
#rm -f "/tmpRoot/lib/usr/bin/cpio"
|
#rm -f "/tmpRoot/lib/usr/bin/cpio"
|
||||||
#rm -f "/tmpRoot/lib/usr/bin/unzip"
|
#rm -f "/tmpRoot/lib/usr/bin/unzip"
|
||||||
rm -f "/tmpRoot/usr/bin/arc-update.sh"
|
|
||||||
rm -f "/tmpRoot/usr/bin/arc-loaderdisk.sh"
|
rm -f "/tmpRoot/usr/bin/arc-loaderdisk.sh"
|
||||||
|
|
||||||
if [ -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon notify - ${1}"
|
echo "Installing addon notify - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf /usr/bin/notify.sh /tmpRoot/usr/bin/notify.sh
|
cp -pf /usr/bin/notify.sh /tmpRoot/usr/bin/notify.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/notify.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/notify.service"
|
||||||
@ -28,7 +28,7 @@ ExecStart=/usr/bin/notify.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/notify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/notify.service
|
ln -vsf /usr/lib/systemd/system/notify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/notify.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon notify - ${1}"
|
echo "Installing addon notify - ${1}"
|
||||||
|
@ -48,7 +48,7 @@ if [ "${1}" = "patches" ]; then
|
|||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon nvmecache - ${1}"
|
echo "Installing addon nvmecache - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
#
|
#
|
||||||
# | models | 1st | 2nd |
|
# | models | 1st | 2nd |
|
||||||
@ -68,7 +68,7 @@ elif [ "${1}" = "late" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
SO_FILE="/tmpRoot/usr/lib/libsynonvme.so.1"
|
SO_FILE="/tmpRoot/usr/lib/libsynonvme.so.1"
|
||||||
[ ! -f "${SO_FILE}.bak" ] && cp -vf "${SO_FILE}" "${SO_FILE}.bak"
|
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
|
|
||||||
# Replace the device path.
|
# Replace the device path.
|
||||||
cp -f "${SO_FILE}.bak" "${SO_FILE}"
|
cp -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||||
|
@ -26,7 +26,7 @@ if [ "${1}" = "early" ]; then
|
|||||||
|
|
||||||
# [CREATE][failed] Raidtool initsys
|
# [CREATE][failed] Raidtool initsys
|
||||||
SO_FILE="/usr/syno/bin/scemd"
|
SO_FILE="/usr/syno/bin/scemd"
|
||||||
[ ! -f "${SO_FILE}.bak" ] && cp -vf "${SO_FILE}" "${SO_FILE}.bak"
|
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
||||||
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
||||||
sed "s/4584ed74b7488b4c24083b01/4584ed75b7488b4c24083b01/" |
|
sed "s/4584ed74b7488b4c24083b01/4584ed75b7488b4c24083b01/" |
|
||||||
@ -36,21 +36,21 @@ if [ "${1}" = "early" ]; then
|
|||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon nvmesystem - ${1}"
|
echo "Installing addon nvmesystem - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
# disk/shared_disk_info_enum.c::84 Failed to allocate list in SharedDiskInfoEnum, errno=0x900.
|
# disk/shared_disk_info_enum.c::84 Failed to allocate list in SharedDiskInfoEnum, errno=0x900.
|
||||||
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
||||||
[ ! -f "${SO_FILE}.bak" ] && cp -vf "${SO_FILE}" "${SO_FILE}.bak"
|
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
|
|
||||||
cp -vf "${SO_FILE}" "${SO_FILE}.tmp"
|
cp -pf "${SO_FILE}" "${SO_FILE}.tmp"
|
||||||
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
||||||
sed "s/0f95c00fb6c0488b94240810/0f94c00fb6c0488b94240810/; s/8944240c8b44240809e84409/8944240c8b44240890904409/" |
|
sed "s/0f95c00fb6c0488b94240810/0f94c00fb6c0488b94240810/; s/8944240c8b44240809e84409/8944240c8b44240890904409/" |
|
||||||
xxd -r -p >"${SO_FILE}" 2>/dev/null
|
xxd -r -p >"${SO_FILE}" 2>/dev/null
|
||||||
rm -f "${SO_FILE}.tmp"
|
rm -f "${SO_FILE}.tmp"
|
||||||
|
|
||||||
# Create storage pool page without RAID type.
|
# Create storage pool page without RAID type.
|
||||||
cp -vf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
|
cp -pf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
|
||||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -pf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/nvmesystem.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/nvmesystem.service"
|
||||||
|
@ -14,10 +14,10 @@ fi
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon nvmevolume - ${1}"
|
echo "Installing addon nvmevolume - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
||||||
[ ! -f "${SO_FILE}.bak" ] && cp -vf "${SO_FILE}" "${SO_FILE}.bak"
|
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
|
|
||||||
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
||||||
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon photosfacepatch - ${1}"
|
echo "Installing addon photosfacepatch - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/PatchELFSharp /tmpRoot/usr/bin/PatchELFSharp
|
cp -pf /usr/bin/PatchELFSharp /tmpRoot/usr/bin/PatchELFSharp
|
||||||
cp -vf /usr/bin/photosfacepatch.sh /tmpRoot/usr/bin/photosfacepatch.sh
|
cp -pf /usr/bin/photosfacepatch.sh /tmpRoot/usr/bin/photosfacepatch.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/photosfacepatch.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/photosfacepatch.service"
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon powersched - ${1}"
|
echo "Installing addon powersched - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
[ ! -f "/tmpRoot/usr/sbin/powersched.bak" -a -f "/tmpRoot/usr/sbin/powersched" ] && cp -vf "/tmpRoot/usr/sbin/powersched" "/tmpRoot/usr/sbin/powersched.bak"
|
[ ! -f "/tmpRoot/usr/sbin/powersched.bak" -a -f "/tmpRoot/usr/sbin/powersched" ] && cp -pf "/tmpRoot/usr/sbin/powersched" "/tmpRoot/usr/sbin/powersched.bak"
|
||||||
cp -vf "/usr/sbin/powersched" "/tmpRoot/usr/sbin/powersched"
|
cp -pf "/usr/sbin/powersched" "/tmpRoot/usr/sbin/powersched"
|
||||||
chmod 755 "/tmpRoot/usr/sbin/powersched"
|
chmod 755 "/tmpRoot/usr/sbin/powersched"
|
||||||
# Clean old entries
|
# Clean old entries
|
||||||
[ ! -f "/tmpRoot/etc/crontab.bak" -a -f "/tmpRoot/etc/crontab" ] && cp -f "/tmpRoot/etc/crontab" "/tmpRoot/etc/crontab.bak"
|
[ ! -f "/tmpRoot/etc/crontab.bak" -a -f "/tmpRoot/etc/crontab" ] && cp -f "/tmpRoot/etc/crontab" "/tmpRoot/etc/crontab.bak"
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon rebootto... - ${1}"
|
echo "Installing addon rebootto... - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin
|
cp -pf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin
|
||||||
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin
|
cp -pf /usr/bin/grub-editenv /tmpRoot/usr/bin
|
||||||
|
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert rebootto... task to esynoscheduler.db"
|
echo "insert rebootto... task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon remotefs - ${1}"
|
echo "Installing addon remotefs - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
SO_FILE="/tmpRoot/usr/lib/libsynosdk.so.7"
|
SO_FILE="/tmpRoot/usr/lib/libsynosdk.so.7"
|
||||||
if [ -f "${SO_FILE}" ]; then
|
if [ -f "${SO_FILE}" ]; then
|
||||||
|
@ -13,9 +13,9 @@ if [ "${1}" = "rcExit" ]; then
|
|||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon rndis - ${1}"
|
echo "Installing addon rndis - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/rndis.sh /tmpRoot/usr/bin/rndis.sh
|
cp -pf /usr/bin/rndis.sh /tmpRoot/usr/bin/rndis.sh
|
||||||
|
|
||||||
mkdir -p /tmpRoot/usr/lib/udev/rules.d
|
mkdir -p /tmpRoot/usr/lib/udev/rules.d
|
||||||
echo 'SUBSYSTEMS=="net", KERNEL=="usb*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rndis.service"' >/tmpRoot/usr/lib/udev/rules.d/99-rndis.rules
|
echo 'SUBSYSTEMS=="net", KERNEL=="usb*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rndis.service"' >/tmpRoot/usr/lib/udev/rules.d/99-rndis.rules
|
||||||
|
Binary file not shown.
@ -9,16 +9,16 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon sensors - ${1}"
|
echo "Installing addon sensors - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
tar -zxf /addons/sensors-7.1.tgz -C /tmpRoot/usr/
|
tar -zxf /addons/sensors-7.1.tgz -C /tmpRoot/usr/
|
||||||
mv -f /tmpRoot/usr/etc/sensors* /tmpRoot/etc
|
mv -f /tmpRoot/usr/etc/sensors* /tmpRoot/etc
|
||||||
cp -vf /usr/bin/arc-sensors.sh /tmpRoot/usr/bin/arc-sensors.sh
|
cp -pf /usr/bin/arc-sensors.sh /tmpRoot/usr/bin/arc-sensors.sh
|
||||||
|
|
||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert sensors task to esynoscheduler.db"
|
echo "insert sensors task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon sequentialio - ${1}"
|
echo "Installing addon sequentialio - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/sequentialio.sh /tmpRoot/usr/bin/sequentialio.sh
|
cp -pf /usr/bin/sequentialio.sh /tmpRoot/usr/bin/sequentialio.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/sequentialio.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/sequentialio.service"
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon setrootpw - ${1}"
|
echo "Installing addon setrootpw - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
mkdir -p /tmpRoot/usr/lib/openssh
|
mkdir -p /tmpRoot/usr/lib/openssh
|
||||||
cp -vf /usr/lib/openssh/sftp-server /tmpRoot/usr/lib/openssh/sftp-server
|
cp -pf /usr/lib/openssh/sftp-server /tmpRoot/usr/lib/openssh/sftp-server
|
||||||
[ ! -f "/tmpRoot/usr/lib/libcrypto.so.3" ] && cp -vf /usr/lib/libcrypto.so.3 /tmpRoot/usr/lib/libcrypto.so.3
|
[ ! -f "/tmpRoot/usr/lib/libcrypto.so.3" ] && cp -pf /usr/lib/libcrypto.so.3 /tmpRoot/usr/lib/libcrypto.so.3
|
||||||
|
|
||||||
FILE="/tmpRoot/etc/ssh/sshd_config"
|
FILE="/tmpRoot/etc/ssh/sshd_config"
|
||||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
||||||
@ -26,7 +26,7 @@ if [ "${1}" = "late" ]; then
|
|||||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||||
echo "copy esynoscheduler.db"
|
echo "copy esynoscheduler.db"
|
||||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||||
cp -vf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
cp -pf /addons/esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||||
fi
|
fi
|
||||||
echo "insert setrootpw task to esynoscheduler.db"
|
echo "insert setrootpw task to esynoscheduler.db"
|
||||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||||
|
@ -13,7 +13,7 @@ function copy_file() {
|
|||||||
local mode="${4}"
|
local mode="${4}"
|
||||||
if [ -f "${input}/${file}" ] && [ -f "${target}/${file}" ]; then
|
if [ -f "${input}/${file}" ] && [ -f "${target}/${file}" ]; then
|
||||||
echo "sspatch: Copying ${file} to ${target}"
|
echo "sspatch: Copying ${file} to ${target}"
|
||||||
cp -vf "${input}/${file}" "${target}/${file}"
|
cp -pf "${input}/${file}" "${target}/${file}"
|
||||||
chown SurveillanceStation:SurveillanceStation "${target}/${file}"
|
chown SurveillanceStation:SurveillanceStation "${target}/${file}"
|
||||||
chmod "${mode}" "${target}/${file}"
|
chmod "${mode}" "${target}/${file}"
|
||||||
fi
|
fi
|
||||||
@ -26,7 +26,7 @@ if [ -d "${SSPATH}" ]; then
|
|||||||
echo "sspatch: SurveillanceStation found"
|
echo "sspatch: SurveillanceStation found"
|
||||||
|
|
||||||
/usr/syno/bin/synopkg stop SurveillanceStation
|
/usr/syno/bin/synopkg stop SurveillanceStation
|
||||||
sleep 5
|
sleep 10
|
||||||
|
|
||||||
# Define the hosts entries to be added
|
# Define the hosts entries to be added
|
||||||
echo "sspatch: Adding hosts entries"
|
echo "sspatch: Adding hosts entries"
|
||||||
@ -85,7 +85,7 @@ if [ -d "${SSPATH}" ]; then
|
|||||||
# copy_file ${SSPATH}/sbin ssrtmpclientd ${PATCHPATHSS} 0755
|
# copy_file ${SSPATH}/sbin ssrtmpclientd ${PATCHPATHSS} 0755
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 5
|
sleep 10
|
||||||
/usr/syno/bin/synopkg restart SurveillanceStation
|
/usr/syno/bin/synopkg restart SurveillanceStation
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon sspatch - ${1}"
|
echo "Installing addon sspatch - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf "/usr/bin/sspatch.sh" "/tmpRoot/usr/bin/sspatch.sh"
|
cp -pf "/usr/bin/sspatch.sh" "/tmpRoot/usr/bin/sspatch.sh"
|
||||||
|
|
||||||
cp -vf "/usr/lib/sspatch.tgz" "/tmpRoot/usr/arc/sspatch.tgz"
|
cp -pf "/usr/lib/sspatch.tgz" "/tmpRoot/usr/arc/sspatch.tgz"
|
||||||
cp -vf "/usr/lib/sspatch-openvino.tgz" "/tmpRoot/usr/arc/sspatch-openvino.tgz"
|
cp -pf "/usr/lib/sspatch-openvino.tgz" "/tmpRoot/usr/arc/sspatch-openvino.tgz"
|
||||||
cp -vf "/usr/lib/sspatch-3221.tgz" "/tmpRoot/usr/arc/sspatch-3221.tgz"
|
cp -pf "/usr/lib/sspatch-3221.tgz" "/tmpRoot/usr/arc/sspatch-3221.tgz"
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
||||||
@ -32,7 +32,7 @@ ExecStart=/usr/bin/sspatch.sh
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/sspatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sspatch.service
|
ln -vsf /usr/lib/systemd/system/sspatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sspatch.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon sspatch - ${1}"
|
echo "Installing addon sspatch - ${1}"
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon storagepanel - ${1}"
|
echo "Installing addon storagepanel - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/storagepanel.sh /tmpRoot/usr/bin/storagepanel.sh
|
cp -pf /usr/bin/storagepanel.sh /tmpRoot/usr/bin/storagepanel.sh
|
||||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -pf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||||
|
|
||||||
shift
|
shift
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon updatenotify - ${1}"
|
echo "Installing addon updatenotify - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
cp -vf /usr/bin/pup /tmpRoot/usr/bin/pup
|
cp -pf /usr/bin/pup /tmpRoot/usr/bin/pup
|
||||||
cp -vf /usr/bin/arc-updatenotify.sh /tmpRoot/usr/bin/arc-updatenotify.sh
|
cp -pf /usr/bin/arc-updatenotify.sh /tmpRoot/usr/bin/arc-updatenotify.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/arc-updatenotify.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/arc-updatenotify.service"
|
||||||
@ -30,7 +30,7 @@ ExecStart=/usr/bin/arc-updatenotify.sh create
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/arc-updatenotify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arc-updatenotify.service
|
ln -vsf /usr/lib/systemd/system/arc-updatenotify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arc-updatenotify.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon arc-updatenotify - ${1}"
|
echo "Installing addon arc-updatenotify - ${1}"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
if [ "${1}" = "late" ]; then
|
if [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon ups - ${1}"
|
echo "Installing addon ups - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
FILE="/tmpRoot/usr/syno/bin/synoups"
|
FILE="/tmpRoot/usr/syno/bin/synoups"
|
||||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
||||||
|
@ -14,10 +14,10 @@ if [ "${1}" = "jrExit" ]; then
|
|||||||
elif [ "${1}" = "late" ]; then
|
elif [ "${1}" = "late" ]; then
|
||||||
echo "Installing addon wol - ${1}"
|
echo "Installing addon wol - ${1}"
|
||||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||||
|
|
||||||
[ ! -f "/tmpRoot/usr/bin/ethtool" ] && cp -vf /usr/bin/ethtool /tmpRoot/usr/bin/ethtool
|
[ ! -f "/tmpRoot/usr/bin/ethtool" ] && cp -pf /usr/bin/ethtool /tmpRoot/usr/bin/ethtool
|
||||||
cp -vf /usr/bin/wol.sh /tmpRoot/usr/bin/wol.sh
|
cp -pf /usr/bin/wol.sh /tmpRoot/usr/bin/wol.sh
|
||||||
|
|
||||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||||
DEST="/tmpRoot/usr/lib/systemd/system/wol.service"
|
DEST="/tmpRoot/usr/lib/systemd/system/wol.service"
|
||||||
@ -27,7 +27,6 @@ Description=Force WOL on ethN
|
|||||||
After=multi-user.target
|
After=multi-user.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/usr/bin/wol.sh
|
ExecStart=/usr/bin/wol.sh
|
||||||
@ -36,7 +35,7 @@ ExecStart=/usr/bin/wol.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||||
ln -vsf /usr/lib/systemd/system/wol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/wol.service
|
ln -vsf /usr/lib/systemd/system/wol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/wol.service
|
||||||
elif [ "${1}" = "uninstall" ]; then
|
elif [ "${1}" = "uninstall" ]; then
|
||||||
echo "Installing addon wol - ${1}"
|
echo "Installing addon wol - ${1}"
|
||||||
|
Loading…
Reference in New Issue
Block a user