Open cleanev opened 2 weeks ago
What is the output of sudo which parted
? Its possible parted is not in root's $PATH
Thanks for looking into this. Here’s the output 17:27:01-pi@masteraio: ~$sudo which parted;echo "";echo $PATH /usr/sbin/parted
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
———————
I checked 2 bullseye installs and 1 bookworm install that has same output as above for $PATH & all 3 are running on a daily schedule.
Hope this helps narrow down the issue.
Title says it all -
Installed newest script on fresh bookworm install on raspberry pi4. If script is run interactively using SSH or at console there is no error and it succeeds whereas using it under a script running as root, throws below error.
PiShrink v0.1.5 - https://github.com/Drewsif/PiShrink pishrink.sh: ERROR occurred in line 261: parted is not installed.
exact command passed in script as well as on ssh/console sudo /usr/local/bin/pishrink.sh -a -d -v -z /mnt/backup/pathtodestination/$HOSTNAME.$(date +%Y%m%d).img OS version - Linux masteraio 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux parted version as reported is - parted (GNU parted) 3.5
Thank you