Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when started from r/o directory #62

Closed
stan-qaz opened this issue Jul 26, 2019 · 3 comments · Fixed by #168
Closed

Error when started from r/o directory #62

stan-qaz opened this issue Jul 26, 2019 · 3 comments · Fixed by #168

Comments

@stan-qaz
Copy link

*Before submitting a bug report, are you using a test version of Pi-hole? No, release version

Describe the bug
I get an error message under the usual text block that blinks in and out.

CPU Temp: 104.4°F CPU Load: 0.07, 0.02, 0.03 CPU Load: [··········] 1.8% /home/pi/bin/padd.sh: line 536: ./piHoleVersion: Permission denied
/home/pi/bin/padd.sh: line 420: ./piHoleVersion: Permission denied

Steps to reproduce the behavior:

  1. Change to /etc
  2. Run PADD /home/pi/bin/padd.sh

Expected behavior
No error message

Additional context
If you cd to the pi home directory all is well.

@tgjohnst
Copy link
Contributor

Looks like this is due to the fact that the piHoleVersion file (used to check for updates) is created in the working directory, which in your case is read-only.

If @jpmck thinks it's appropriate, it would be pretty simple to change the script's behavior to always create the piHoleVersion file in the same directory as the piHole script (i.e. replace references to piHoleVersion and ./piHoleVersion with $(dirname "$0")/piHoleVersion ), but I'm not sure this is a desired behavior so won't push a PR yet.

@subnut subnut mentioned this issue Aug 15, 2021
8 tasks
@Bogdan107
Copy link

Bogdan107 commented Dec 16, 2021

Proposal: create piHoleVersion file under the /tmp directory.

This padd-3.6.2.sh.patch do:

  1. Improve ${PIHOLEVERSION} variable.
    With this one each can specify in one place where piHoleVersion file must be placed.
  2. Change /sbin/ip to ip.
    My system has /bin/ip file, not /sbin/ip.
  3. Add double quotes in write it all to the file part of GetVersionInformation() function.

@thomasmerz
Copy link
Contributor

This makes sense to me. The linked PR #168 will fix/correct this 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants