mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
tweaked help and comments for the sudo information, it requires sudo -V 1.7 or newer to use -n option.
If older, sudo will just error out, which is fine for now, it always works as root though. Eventually all systems will support this, so there's no real need to test for version numbers of sudo I think.
This commit is contained in:
parent
093a11e67d
commit
042cd2cd65
7
inxi
7
inxi
|
@ -1220,8 +1220,8 @@ show_options()
|
|||
print_screen_output " 5 - For multicore systems, also show per core clock speeds; shows audio card."
|
||||
print_screen_output "-x Show extra data: bogomips on Cpu; driver version (if available) for Network/Audio;"
|
||||
print_screen_output " direct rendering status for Graphics (in X). Only works with verbose or line output."
|
||||
print_screen_output " Shows hdd temp with disk data if you have hddtemp installed, if you are root OR if you "
|
||||
print_screen_output " have added to /etc/sudoers: <username> ALL = NOPASSWD: /usr/sbin/hddtemp (path to hddtemp)"
|
||||
print_screen_output " Shows hdd temp with disk data if you have hddtemp installed, if you are root OR if you have"
|
||||
print_screen_output " added to /etc/sudoers (sudo v. 1.7 or newer): <username> ALL = NOPASSWD: /usr/sbin/hddtemp (path to hddtemp)"
|
||||
print_screen_output ""
|
||||
print_screen_output "Additional Options:"
|
||||
print_screen_output "-h - this help menu."
|
||||
|
@ -2606,7 +2606,8 @@ get_hdd_temp_data()
|
|||
local hdd_temp='' sudo_command=''
|
||||
|
||||
if [[ -n $( which hddtemp ) && -n $1 ]];then
|
||||
# only use sudo if not root
|
||||
# only use sudo if not root, -n option requires sudo -V 1.7 or greater. sudo will just error out
|
||||
# which is the safest course here for now, otherwise that interactive sudo password thing is too annoying
|
||||
if [[ $B_ROOT != 'true' ]];then
|
||||
sudo_command='sudo -n '
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue