SOLVED auto-update bug = Typo in update202020

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,816
Reaction score
630
The download file 'update202020' has a minor typo at line 12 column 57
Code:
echo "PortKnocker security patch" > /etc/pbx/.update2020120
#should read
echo "PortKnocker security patch" > /etc/pbx/.update202020

It results in the creation of the spurious file /etc/pbx/.update2020120 which hi-jacks the text that should be in .update202020
Then it does chattr +i on the wrong file.
 
@ostridge Fixed. Thanks.

@wardmundy and @ostridge , for those that logged into their console and the auto update utility ran prior to this fix, what do we do to fix this issue because when I log back into the console and let the auto utility run, it already thinks this update has been applied?:

This update utility goes to IncrediblePBX.com to retrieve the latest updates.
We test updates before release, but NO WARRANTY EXPRESS OR IMPLIED IS PROVIDED.
Your voluntary financial support of this update service is most appreciated.
To make a contribution using any credit card, please visit http://nerd.bz/QwQkYO

To proceed solely at your own risk, press Enter. Otherwise, Ctrl-C to abort.

Retrieving... lastupdate2020
Updates available as of Wed Sep 30 09:12:08 MST 2020: 20
Checking for update20201. INSTALLED: Automatic Update Utility is working
Checking for update20202. INSTALLED: Patches for Incredible PBX 2020.3 Raspbian
Checking for update20203. INSTALLED: ClearlyIP repo configured for updates
Checking for update20204. INSTALLED: Incredible PBX 2020.3 Raspbian CDR patch
Checking for update20205. INSTALLED: Incredible PBX 2020.3 AsteriDex patch
Checking for update20206. INSTALLED: FreePBX GPG Key Refresh
Checking for update20207. INSTALLED: halt and reboot scripts added
Checking for update20208. INSTALLED: timezone-setup update for Raspbian 10
Checking for update20209. INSTALLED: TM3 add-fqdn update for IPv6 use
Checking for update202010. INSTALLED: Raspbian 10 Incredible Fax installer updat e
Checking for update202011. INSTALLED: Incredible PBX 2020.3 pbxstatus LAN port p atch
Checking for update202012. INSTALLED: NV-Weather-ZIP patch for 0 zip codes
Checking for update202013. INSTALLED: Incredible PBX 2020.3 amd.conf patch
Checking for update202014. INSTALLED: LAME aadded for voicemail processing
Checking for update202015. INSTALLED: watson-test STT script added to /usr/local /sbin
Checking for update202016. INSTALLED: Wolfram Alpga AGI script updated
Checking for update202017. INSTALLED: Asterisk 16 update script patched
Checking for update202018. INSTALLED: Removed Asterisk duplicate logging
Checking for update202019. INSTALLED: AvantFax MySQL patch for Raspbian
Checking for update202020. INSTALLED:
Updates and notifications completed.
To continue, press the Enter key...
 
The update was applied. You just don't see what it was. If you want it fixed cleanly:
Code:
chattr -i /etc/pbx/.update202020
rm /etc/pbx/.update202020
# then logout and back in
 
Last edited:
The update was applied. You just don't see what it was. If you want it fixed cleanly:
Code:
rm /etc/pbx/.update202020
# then logout and back in
[root@pbx ~]# rm /etc/pbx/.update202020
rm: cannot remove ‘/etc/pbx/.update202020’: Operation not permitted

I'm guessing we need to chattr something
 
it already thinks this update has been applied
Hi @Prits You are right it appears to have been applied; and it has in fact worked as intended, but it sent the text to say what was updated into the wrong file. the .update202020 file was also made and locked in but without the descriptive text. Its just the updater that needed correcting.

sorry @tbrummell posts crossed.
 
Code:
chattr -f -i /etc/pbx/.update202020
rm /etc/pbx/.update2020120
echo "PortKnocker security patch" > /etc/pbx/.update202020
chattr +i /etc/pbx/.update202020

Hey @ostridge , I tried the above and when I get to the following, it get an error:

root@vps:~ $ echo "PortKnocker security patch" > /etc/pbx/.update202020
-bash: /etc/pbx/.update202020: Permission denied
WARNING: Always run Incredible PBX behind a secure firewall.
root@vps:~ $
 
Permission denied
Then the 'i' immutable bit must still be set.
the chattr -i removes that the -f is to suppress (some?) errors
chattr -f -i /etc/pbx/.update202020
did this chattr line not give an error?
 
Ok guys, so sorry, I think there was a bad hidden character when I cut and paste from @ostridge instructions here to my console lol

I did it all again and it gave no errors - sorry @wardmundy and @ostridge

btw, so does this disable portknocker altogether? what should I expect again after this patch has been applied? PBX status shows portknocker is UP.
 
Last edited:
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top