# Editing dietpi-globals

**URL:** <https://dietpi.com/forum/t/editing-dietpi-globals/4993>\
**Category:** General Discussion\
**Created:** [16 February 2021 13:20 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993 "2021-02-16T13:20:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thanapat](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Thanapat](https://dietpi.com/forum/u/Thanapat)\
**Post date:** [16 February 2021 13:20 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/1 "2021-02-16T13:20:24Z")

</div>

Hi, everyone.  
I just install dietpi on my Roseapple Pi.  
The roseapple pi is a SBC like raspberry pi and I received long time ago, and now the developer of roseapple pi is discontinued. So I install dietpi on it using PREP\_SYSTEM\_FOR\_DIETPI.sh script. And found that CPU temp on SSH banner shows 0\*C all the time.  
After I search for many hours, I found that roseapple CPU temp is on /sys/class/thermal/thermal\_zone1/temp but dietpi read /sys/class/thermal/thermal\_zone0/temp. So I edit dietpi-globals to read cpu temp from /sys/class/thermal/thermal\_zone1/temp instead and that’s work!  
I have a question that in future if dietpi has update. Will dietpi-globals overwritten and my script will gone ?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 February 2021 15:01 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/2 "2021-02-16T15:01:54Z")

</div>

Hi,

yes usually all DietPi scripts will be overwritten running dietpi-update

---

<div class="post-metadata">

**Author:** ![Thanapat](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Thanapat](https://dietpi.com/forum/u/Thanapat)\
**Post date:** [16 February 2021 16:03 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/3 "2021-02-16T16:03:38Z")

</div>

Thank you for the answer. Do you have any suggestion to keep SSH banner shows actual cpu temp?

Thank you.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 February 2021 21:53 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/4 "2021-02-16T21:53:10Z")

</div>

not really, except it will be added to the script directly.

MichaIng  
something to add to our script?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [18 February 2021 20:14 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/5 "2021-02-18T20:14:47Z")

</div>

Thanapat  
Does /sys/class/thermal/thermal\_zone0/temp even exist and in case does it contain 0 or something else? If it does contain an integer, it’s difficult to get that fixed for Roseapple Pi without breaking it for other SBCs, since we have no dedicated hardware ID for Roseapple Pi. But if the other kernel tunables do not contain valid integers, we could add /sys/class/thermal/thermal\_zone1/temp to the end of the list, so that it is only parsed if previous tunables are not present or contain garbage.

---

<div class="post-metadata">

**Author:** ![Thanapat](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Thanapat](https://dietpi.com/forum/u/Thanapat)\
**Post date:** [19 February 2021 04:33 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/6 "2021-02-19T04:33:38Z")

</div>

Yes, /sys/class/thermal/thermal\_zone0/temp contain 0.  
Are there any method to change thermal\_zone1/ into thermal\_zone0?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [19 February 2021 16:16 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/7 "2021-02-19T16:16:58Z")

</div>

There is at least no generic way to rename kernel tunables. Probably we could treat all non-positive values as invalid. I mean theoretically it’s possible to use liquid nitrogen cooling and such to run a CPU at negative degree Celsius, but I doubt that any of our users practically does this. This also solves an issue for some OrangePi’s where currently temperatures like “-25435” are shown, whatever the meaning/purpose of this is kernel-wise.

---

<div class="post-metadata">

**Author:** ![Thanapat](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Thanapat](https://dietpi.com/forum/u/Thanapat)\
**Post date:** [20 February 2021 17:46 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/8 "2021-02-20T17:46:43Z")

</div>

That’s a great solution. I think this could solve the same problem on many SBCs. Will you implement this solution in the further update?

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [21 February 2021 12:58 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/9 "2021-02-21T12:58:28Z")

</div>

Just added: [https://github.com/MichaIng/DietPi/commit/a1ecafb70f5d6aa207d785caaeeeb06f352d4ca7](https://github.com/MichaIng/DietPi/commit/a1ecafb70f5d6aa207d785caaeeeb06f352d4ca7)  
Changelog: [https://github.com/MichaIng/DietPi/commit/6a6262432215c81d1112b903c22985abd98ade57](https://github.com/MichaIng/DietPi/commit/6a6262432215c81d1112b903c22985abd98ade57)

---

<div class="post-metadata">

**Author:** ![Thanapat](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/958977/32.png) [@Thanapat](https://dietpi.com/forum/u/Thanapat)\
**Post date:** [21 February 2021 13:11 UTC](https://dietpi.com/forum/t/editing-dietpi-globals/4993/10 "2021-02-21T13:11:02Z")

</div>

Thank you very much.
