Giter Site home page Giter Site logo

Comments (10)

tavinus avatar tavinus commented on May 20, 2024 1

Hi again! Just made a test piping it to sh and I got the same problem.
I am not sure why it does not ask when piping the script.
I am also not sure how to pass a parameter when running like that (you could tell it to install without asking with that).

I would ask you to just download the script and then run it locally instead of directly piping it from curl or wget. So, you can use curl or wget to download as described on the readme, or even use git to clone the repo. Then you can just call it with or without parameters.

If you still want to download and run at once, I would recommend using something like this:

curl -k -sSL https://raw.githubusercontent.com/tavinus/opkg-upgrade/master/opkg-upgrade.sh -o ./opkg-upgrade.sh && chmod +x ./opkg-upgrade.sh && ./opkg-upgrade.sh

This will download, set to executable and run (on the current directory).
Tested and working!
Hope this helps!

Cheers!
Gus

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

Hi! sorry for the late response!

Humm...
I never really tried to run it "directly from the internet".
Does the same thing happen if u try to run it locally?
I mean if u download first and then try to run it locally?

You should be asked if you want to install the updates at that point.
I will try to reproduce it here soon.

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

Ok, so this seems to be normal to happen in this case.
References:

Because there is not stdin for read to process the response when run like that.
Tell me what you think.

from opkg-upgrade.

sml156 avatar sml156 commented on May 20, 2024

Thanks for your response, I have not tried to run it locally but I will try the script you just posted thank you.

Update:
I tried the command you posted above and it worked perfectly Thank you

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

Sweet!
Thanks for posting, good to know it does not work like that anyways.
Cheers!

from opkg-upgrade.

sml156 avatar sml156 commented on May 20, 2024

I will read the links you posted soon.

I was hoping it would work the same as it does in Ubuntu, I use a DNS server called Pihole and that's how it's installed.

https://github.com/pi-hole/pi-hole

from opkg-upgrade.

sml156 avatar sml156 commented on May 20, 2024

You should also put that command on your Readme page as long as people have curl installed it works great.

opkg update

opkg install curl

curl -k -sSL https://raw.githubusercontent.com/tavinus/opkg-upgrade/master/opkg-upgrade.sh -o ./opkg-upgrade.sh && chmod +x ./opkg-upgrade.sh && ./opkg-upgrade.sh

DONE

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

As far as I can tell the problem is only with read, which is used to ask for permission to install the updates. When you pipe it to sh another shell is created and stdin is not "redirected" so there is no response (or at least no Y/y response) on which case the script thinks something other than Y was the response.

The download call is basically the same I have on the readme, but without using variables and this one runs the script after downloading. I think it is less intrusive that way, but who knows. The better way is always to use git in any case, but not really needed.

I also have an explanation for the curl -k option to ignore SSL certificates and all there. I believe this should not be default as many people may not realize there is a security risk there.

Cheers!
Gus

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

Just a side note. This would also happen in any other linux distro (including ubuntu). Pihole works because it does not ask anything for the user (or he would have the same problem with read not receiving the answer I think). I would need a separate installer script for you to run like that.

Same approach is used by get.acme.sh (LetsEncrypt SH script). He has an installer on http://get.acme.sh which install the acme.sh script itself.

So, in any case, running the installer like that would not run the script itself.

from opkg-upgrade.

tavinus avatar tavinus commented on May 20, 2024

Also, he uses a variable to pass a parameter, as in:

curl https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh | INSTALLONLINE=1  sh

That INSTALLONLINE=1 there.
But note that he has to do it after the pipe.

from opkg-upgrade.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.