Skip to content

Commit 0edc720

Browse files
committed
fix for patch revoke older addon version
1 parent 37a2294 commit 0edc720

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/rc.d/jp-hb-devices-addon

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RL_FILE=/lib/udev/rules.d/99-hmip-rfusb.rules
2121
CK_FIRMWARE_FILE=${FIRMWARE_DIR}/hb-uni-sen-cap-moist.xml
2222

2323
PATCHSUBDIR_COMMON=common
24-
PATCHSUBDIR_VERSION=le_363
24+
2525
check_ccu_fw_version()
2626
{
2727
model=`grep VERSION /boot/VERSION | awk -F'[=.]' {'print $2'}`
@@ -35,6 +35,8 @@ check_ccu_fw_version()
3535

3636
if [ $model -ge 2 ] && [ $version -ge 65 ]; then
3737
PATCHSUBDIR_VERSION=ge_365
38+
else
39+
PATCHSUBDIR_VERSION=le_363
3840
fi
3941

4042
echo "Found firmware version $model.$version.$build - using patch subdirectory version ${PATCHSUBDIR_VERSION}" | tee -a $TMP_LOGFILE | tee -a $TMP_ERRFILE
@@ -156,9 +158,16 @@ case "$1" in
156158

157159
### revoke patches from currently installed addon version
158160
if [ -f ${CK_FIRMWARE_FILE} ] && [ -d ${PATCH_DIR} ]; then
159-
currentversion=`cat ${ADDON_DIR}/VERSION`
160-
echo "Revoking current addon V $currentversion patch files." | tee $TMP_LOGFILE | tee $TMP_ERRFILE
161+
currentversion_major=`cat /usr/local/addons/jp-hb-devices-addon/VERSION | awk -F'[=.]' {'print $1'}`
162+
currentversion_minor=`cat /usr/local/addons/jp-hb-devices-addon/VERSION | awk -F'[=.]' {'print $2'}`
163+
164+
if [ $currentversion_major -eq 5 ]; then
165+
PATCHSUBDIR_VERSION=ge_345
166+
fi
167+
168+
echo "Revoking current addon V $currentversion_major.$currentversion_minor patch files." | tee $TMP_LOGFILE | tee $TMP_ERRFILE
161169
patcher "REVOKE"
170+
check_ccu_fw_version
162171
fi
163172

164173
### delete the old (current) addon directory and rename the newly uploaded

0 commit comments

Comments
 (0)