Added step to downgrade xmpp dependencies to avoid "callbackIQ crash"
This commit is contained in:
57
seqs/fhem.sh
57
seqs/fhem.sh
@@ -78,6 +78,63 @@ step_32() {
|
||||
}
|
||||
systemdConfigLoc="/etc/systemd/system"
|
||||
|
||||
step_34_info() { echo "Downgrade $toolName jabber dependencies (callbackIQ -> FHEM crash)"; }
|
||||
step_34_alias() { ALIAS="downgrade_xmpp"; }
|
||||
step_34() {
|
||||
if [ ! -f $libnetDown ]; then
|
||||
exe wget "$libnetUrl" -O "$libnetDown"
|
||||
endReturn -o $? "Download of $libnetUrl failed"
|
||||
fi
|
||||
if [ ! -f $libxmlDown ]; then
|
||||
exe wget "$libxmlUrl" -O "$libxmlDown"
|
||||
endReturn -o $? "Download of $libxmlUrl failed"
|
||||
fi
|
||||
|
||||
local aptOption=
|
||||
if [ $QUIET -ne 0 ] ; then
|
||||
aptOption="-y"
|
||||
else
|
||||
aptOption=""
|
||||
fi
|
||||
|
||||
exe apt remove libnet-jabber-perl $aptOption
|
||||
saveReturn $?
|
||||
exe apt remove libnet-xmpp-perl $aptOption
|
||||
saveReturn $?
|
||||
exe apt remove libxml-stream-perl $aptOption
|
||||
saveReturn $?
|
||||
endReturn "Failed removing packages; Manual fix required"
|
||||
|
||||
exe dpkg -i "$libxmlDown"
|
||||
saveReturn $?
|
||||
exe dpkg -i "$libnetDown"
|
||||
saveReturn $?
|
||||
exe apt install libnet-jabber-perl $aptOption
|
||||
saveReturn $?
|
||||
endReturn "Failed removing packages; Manual fix required"
|
||||
|
||||
exe rm "$libxmlDown" "$libnetDown"
|
||||
}
|
||||
libnetName="libnet-xmpp-perl_1.02-3_all.deb"
|
||||
libnetDown="/tmp/$libnetName"
|
||||
libnetUrl="http://ftp.de.debian.org/debian-archive/debian/pool/main/libn/libnet-xmpp-perl/$libnetName"
|
||||
libxmlName="libxml-stream-perl_1.23-2_all.deb"
|
||||
libxmlDown="/tmp/$libxmlName"
|
||||
libxmlUrl="http://ftp.de.debian.org/debian/pool/main/libx/libxml-stream-perl/$libxmlName"
|
||||
|
||||
step_35_info() { echo "Pin downgraded $toolName jabber dependencies"; }
|
||||
step_35() {
|
||||
addConf -s "$aptPinXmpp" "$aptPinFile"
|
||||
}
|
||||
aptPinFile="/etc/apt/preferences.d/00_FhemJabber"
|
||||
aptPinXmpp="Package: libnet-xmpp-perl
|
||||
Pin: version 1.02-3*
|
||||
Pin-Priority: 1000
|
||||
|
||||
Package: libxml-stream-perl
|
||||
Pin: version 1.23-2
|
||||
Pin-Priority: 1000"
|
||||
|
||||
step_40_info() { echo "Execute fhem [COMMAND]"; }
|
||||
step_40_alias() { ALIAS="exe"; }
|
||||
step_40() {
|
||||
|
Reference in New Issue
Block a user