2022-12-18 10:36:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
patchv22120(){
|
|
|
|
echo "Applying 22.12 HotPatch 1"
|
2022-12-18 10:44:24 +00:00
|
|
|
( wget -q -P /tmp https://github.com/truecharts/truetool/raw/main/hotpatch/2212/HP1.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ < /tmp/HP1.patch && echo "patch completed" || echo "patch failed or skipped, not critical" ) && rm -rf /tmp/HP1.patch
|
2022-12-18 10:36:53 +00:00
|
|
|
}
|
|
|
|
export -f patchv22120
|
|
|
|
|
|
|
|
|
|
|
|
hotpatch(){
|
|
|
|
echo "Starting hotpatcher..."
|
|
|
|
if [ "$(cli -m csv -c 'system version' | awk -F '-' '{print $3}')" == "22.12.0" ]; then
|
|
|
|
patchv22120
|
|
|
|
fi
|
|
|
|
}
|
2022-12-18 10:38:18 +00:00
|
|
|
export -f hotpatch
|