Closed CodePhase closed 1 year ago
I wonder if we should really use sudo, doas, or whatever, and not just check if uid is != 0 and stop right there if user isn't root... I'll merge it now, just something to think about, as I already merged the part in meta-qcom and we need this piece too... but maybe at some point it's just better to let the user use whatever (s)he normally uses
The issue with checking to see if uid is 0 is that the log files then get stored in root's directory with root's permissions. I think that would be an extra step to then move the files back to the intended user's directory and control. I favor the sudo way since if someone really wants to they could give themselves passwordless permission on those commands in the sudoers file and it would just run uninterrupted. Also, I don't really like running things as root unless they have to be.
This update needs the PR https://github.com/the-modem-distro/meta-qcom/pull/28 to be merged since it uses the new log naming convention--.log instead of -.log.. It also addresses other concerns in https://github.com/the-modem-distro/pinephone_modem_sdk/issues/148.
Note: I added sudo to the adb commands since that's what's required to run those commands on my system. If this is not appropriate, I can remove it.