Skip to content

Commit

Permalink
Merge pull request #261 from AuxXxilium/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AuxXxilium authored Jan 17, 2024
2 parents b40728a + fe81f26 commit 679b9d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion disks/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ function nondtModel() {
MAXDISKS=$(($(_get_conf_kv maxdisks)))
echo "get maxdisks=${MAXDISKS}"
else
#[ ${HBA_NUMBER} -gt 0 ] && MAXDISKS=26
[ ${HBA_NUMBER} -gt 0 ] && MAXDISKS=26
[ ${MAXDISKS} -lt 26 ] && MAXDISKS=26
fi
if _check_post_k "rd" "usbportcfg"; then
Expand Down
Binary file modified eudev/all/addons/eudev-7.1.tgz
100755 → 100644
Binary file not shown.
Binary file modified eudev/all/addons/eudev-7.2.tgz
100755 → 100644
Binary file not shown.
40 changes: 20 additions & 20 deletions eudev/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# DSM version
MajorVersion=$(/bin/get_key_value /etc.defaults/VERSION majorversion)
MinorVersion=$(/bin/get_key_value /etc.defaults/VERSION minorversion)
#ModuleUnique=$(/bin/get_key_value /etc.defaults/VERSION unique) # Avoid confusion with global variables
ModuleUnique=$(/bin/get_key_value /etc.defaults/VERSION unique) # Avoid confusion with global variables

echo "MajorVersion:${MajorVersion} MinorVersion:${MinorVersion}"
echo "eudev: MajorVersion:${MajorVersion} MinorVersion:${MinorVersion}"

if [ "${1}" = "modules" ]; then
echo "Starting eudev daemon - modules"
Expand All @@ -23,9 +23,10 @@ if [ "${1}" = "modules" ]; then
}
echo "Triggering add events to udev"
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=subsystems --action=change
udevadm trigger --type=devices --action=add
udevadm trigger --type=devices --action=change
udevadm settle --timeout=30 || echo "udevadm settle failed"
udevadm settle --timeout=30 || echo "eudev: udevadm settle failed"
# Give more time
sleep 10
# Remove from memory to not conflict with RAID mount scripts
Expand All @@ -34,29 +35,27 @@ if [ "${1}" = "modules" ]; then
/usr/sbin/lsmod | grep -q ^kvm_intel && /usr/sbin/rmmod kvm_intel || true # kvm-intel.ko
/usr/sbin/lsmod | grep -q ^kvm_amd && /usr/sbin/rmmod kvm_amd || true # kvm-amd.ko
/usr/sbin/lsmod | grep -q ^kvm && /usr/sbin/rmmod kvm || true
/usr/sbin/lsmod | grep -q ^irqbypass && /usr/sbin/rmmod irqbypass || true
#/usr/sbin/lsmod | grep -q ^irqbypass && /usr/sbin/rmmod irqbypass || true

elif [ "${1}" = "late" ]; then
echo "Starting eudev daemon - late"

#echo "eudev: copy HWDB"
#cp -vf /etc/udev/hwdb.d/* /tmpRoot/etc/udev/hwdb.d/
echo "eudev: copy modules"
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
/tmpRoot/bin/cp -rnf /usr/lib/firmware/* /tmpRoot/usr/lib/firmware/
cat /addons/modulelist 2>/dev/null | /tmpRoot/bin/sed '/^\s*$/d' | while IFS=' ' read -r O M; do
[ "${O:0:1}" = "#" ] && continue
[ -z "${M}" -o -z "$(ls /usr/lib/modules/${M} 2>/dev/null)" ] && continue
if [ "${O}" = "F" ] || [ "${O}" = "f" ]; then
/tmpRoot/bin/cp -vrf /usr/lib/modules/${M} /tmpRoot/usr/lib/modules/
else
/tmpRoot/bin/cp -vrn /usr/lib/modules/${M} /tmpRoot/usr/lib/modules/
fi
done
/usr/sbin/depmod -a -b /tmpRoot/
if [ ! "${ModuleUnique}" = "synology_epyc7002_sa6400" ]; then
echo "eudev: copy firmware"
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
/tmpRoot/bin/cp -rnf /usr/lib/firmware/* /tmpRoot/usr/lib/firmware/
#/tmpRoot/bin/cp -rnf /usr/lib/modules/* /tmpRoot/usr/lib/modules/
/usr/sbin/depmod -a -b /tmpRoot/
else
echo "eudev: copy firmware"
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
/tmpRoot/bin/cp -rnf /usr/lib/modules/* /tmpRoot/usr/lib/modules/
fi

echo "Copy rules"
echo "eudev: copy Rules"
cp -vf /usr/lib/udev/rules.d/* /tmpRoot/usr/lib/udev/rules.d/
echo "eudev: copy HWDB"
cp -vf /etc/udev/hwdb.d/* /tmpRoot/etc/udev/hwdb.d/
[ -f "/tmpRoot/lib/systemd/system/udevrules.service" ] && rm -f "/tmpRoot/lib/systemd/system/udevrules.service"
DEST="/tmpRoot/lib/systemd/system/udevrules.service"
echo "[Unit]" >${DEST}
Expand All @@ -67,6 +66,7 @@ elif [ "${1}" = "late" ]; then
echo "RemainAfterExit=true" >>${DEST}
echo "ExecStart=/usr/bin/udevadm hwdb --update" >>${DEST}
echo "ExecStart=/usr/bin/udevadm control --reload-rules" >>${DEST}
echo "ExecStart=/usr/bin/udevadm trigger" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
Expand Down

0 comments on commit 679b9d3

Please sign in to comment.