unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices
GNU General Public License v3.0
3.9k stars 419 forks source link

on-boot script gives error #470

Closed manunited10 closed 1 year ago

manunited10 commented 1 year ago

Describe the bug on-boot script gives error running automatic script or manual method.

To Reproduce Steps to reproduce the behavior:

  1. ssh root@ip
  2. run curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/HEAD/on-boot-script/remote_install.sh" | /bin/sh
  3. See error

    
    # curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/HEAD/on-boot-script/remote_install.sh" | /bin/sh
    _   _ ___  __  __   ___           _
    | | | |   \|  \/  | | _ ) ___  ___| |_
    | |_| | |) | |\/| | | _ \/ _ \/ _ \  _|
    \___/|___/|_|  |_| |___/\___/\___/\__|
    
    Execute any script when your udm system
    starts.

UniFi Dream Machine Pro version 1.12.33 was detected Installing on-boot script... Downloading UDM boot package...

Installing UDM boot package... dpkg-deb: error: archive '/tmp/udm-boot_1.0.6_all.deb' uses unknown compression for member 'control.tar.zst', giving up dpkg: error processing archive /tmp/udm-boot_1.0.6_all.deb (--install): subprocess dpkg-deb --control returned error exit status 2

-> ubnt-dpkg-cache install

<-# ubnt-dpkg-cache install Errors were encountered while processing: /tmp/udm-boot_1.0.6_all.deb Error: non zero exit code: 1: OCI runtime error

Failed to install on-boot script service


**UDM Information**
 - Variant Dream Machine Pro
 - Firmware Version: 1.12.33
 - Controller Version: 7.2.95

**Additional context**
Steps to run manually:
1. ssh to udmpro
2. run `unifi-os shell`
3. Manual method
3.1. If I run (as suggested on readme)

curl -L [https://udm-boot.boostchicken.dev](https://unifi.boostchicken.io/udm-boot_1.0.6_all.deb) -o udm-boot_1.0.6_all.deb

I get 
```bash: syntax error near unexpected token '(' ```
3.2. If I run 

curl -L https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script/packages/udm-boot_1.0.6_all.deb -o /tmp/udm-boot_1.0.6_all.deb dpkg -i /tmp/udm-boot_1.0.6_all.deb

then I get

dpkg-deb: error: '/tmp/udm-boot_1.0.6_all.deb' is not a debian format archive dpkg: error processing archive /tmp/udm-boot_1.0.6_all.deb (--install): subprocess dpkg-deb --control returned error exit status 2

-> ubnt-dpkg-cache install

<-# ubnt-dpkg-cache install Errors were encountered while processing: /tmp/udm-boot_1.0.6_all.deb

gatesry commented 1 year ago

Any reason you’re still on the 1.X branch? I believe this script was refactored for the new updates.

manunited10 commented 1 year ago

Sorry I just googled it I guess and brought me here. Which branch should I use? I see HEAD, gh-pages and main.

Edit - I'm following this page. Am I on a wrong one? https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script/README.md

gatesry commented 1 year ago

You’ll have to update the firmware on your UDM P. See here: https://community.ui.com/releases/UniFi-OS-Dream-Machines-2-4-23/aebbba64-9e7e-4151-bcca-34ed08761f08

manunited10 commented 1 year ago

Oh sorry you are talking about UDMP - my bad. I thought I am on the latest. I always update it whenever it prompts me. Let me check it.

manunited10 commented 1 year ago

You’ll have to update the firmware on your UDM P. See here: https://community.ui.com/releases/UniFi-OS-Dream-Machines-2-4-23/aebbba64-9e7e-4151-bcca-34ed08761f08

This link redirects me to Join Early Access page and regardless of me opting in, it shows me the same thing. Potentially I need to wait. Anyway, I went on the UDMPro's portal, and if I change the UniFi Os Release Channel from Official to Early Access it shows me update version 1.12.38 is available. If I select Offical or Release Candidcate I get Up to Date (which is my current version: 1.12.33) What am I missing?

darkorb commented 1 year ago

You’ll have to update the firmware on your UDM P. See here: https://community.ui.com/releases/UniFi-OS-Dream-Machines-2-4-23/aebbba64-9e7e-4151-bcca-34ed08761f08

This link redirects me to Join Early Access page and regardless of me opting in, it shows me the same thing. Potentially I need to wait. Anyway, I went on the UDMPro's portal, and if I change the UniFi Os Release Channel from Official to Early Access it shows me update version 1.12.38 is available. If I select Offical or Release Candidcate I get Up to Date (which is my current version: 1.12.33) What am I missing?

2.x is EA only. You have to update to 1.12.38 and then you can update to 2.4.27. Please read the forum post for it, there are potential risks with being on EA - including the inability to downgrade once you are on 2.4.x.

boostchicken commented 1 year ago

Try the new 1.0.6. Make sure to re-download it

manunited10 commented 1 year ago

Try the new 1.0.6. Make sure to re-download it

The installation was successful with the fix (on official release: v1.12.33). Tested with both warm and cold reboot - works like a charm. Thanks @boostchicken.

boostchicken commented 1 year ago

try 1.0.7, it should work on 1.12 and 2.x