Comments (10)
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.
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.
Ok, so this seems to be normal to happen in this case.
References:
- https://www.google.com.br/search?q=read+does+not+work+when+piping+to+sh&rlz=1C1CHZL_pt-BRBR714BR714&oq=read+does+not+work+when+piping+to+sh&aqs=chrome..69i57.9535j0j7&sourceid=chrome&ie=UTF-8
- https://stackoverflow.com/questions/16854041/bash-read-is-being-skipped-when-run-from-curl-pipe
- https://stackoverflow.com/questions/2746553/bash-script-read-values-from-stdin-pipe
- https://stackoverflow.com/questions/19408649/pipe-input-into-a-script
Because there is not stdin for read
to process the response when run like that.
Tell me what you think.
from opkg-upgrade.
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.
Sweet!
Thanks for posting, good to know it does not work like that anyways.
Cheers!
from opkg-upgrade.
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.
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.
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.
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.
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)
- Love this script - cron+email HOT 17
- Just thought I would let you know your script still works OpenWRT 19.07.0 first release candidate HOT 1
- [Contribution] How to run from Luci HOT 2
- Integrating opkg-upgrade in .profile - how to use background checking for new packages HOT 2
- ssmtp is not available on OpenWrt 21.02 and later
- Wish List - 2019/2020/2021/2022/2023 HOT 13
- Package for openwrt HOT 4
- Incorrect statement when no packages need updates HOT 8
- Optional removal of *-opkg from /etc/config after upgrade HOT 2
- Automatically check for new versions of opkg-upgrade HOT 3
- Does opkg: bump to version 2019-06-14 affect us? HOT 2
- Blacklist packages HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opkg-upgrade.