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

Added on banner silly "Up since" #7284

Open
dentaku65 opened this issue Nov 21, 2024 · 8 comments
Open

Added on banner silly "Up since" #7284

dentaku65 opened this issue Nov 21, 2024 · 8 comments

Comments

@dentaku65
Copy link

On /boot/dietpi/.dietpi-banner_custom
Add:
stat -c %w / |cut -f1 -d "."

Enable on /boot/dietpi/.dietpi-banner
aDESCRIPTION[10]='Up since'

Untitled

@MichaIng
Copy link
Owner

Based on the command, this is to show how old the image is, right?

My first thought was: "but we have an uptime option already?", then recognised that this is something different 😄.
image

@dentaku65
Copy link
Author

Hi MichaIng,
yep, command shows DietPI first run and operate since. Can be considered "age".
And yes my DietPI is operating since "2018-03-13 23:51:07" without issue :-)
Den

@MichaIng
Copy link
Owner

To be precise, for new images, it is the time at which the image was generated, or more precisely, at which our build script creates some initial directories, before running mmdebstrap to install the initial Debian base system 🙂.

For a first boot timestamp, there are some log files, like /var/tmp/dietpi/logs/fs_partition_resize.log which could be used. But they are of course not guaranteed to exist in any case. /boot/dietpi/.hw_model might be also an idea. It is re-created on every boot, but never removed, AFAIK.

@dentaku65
Copy link
Author

Well, English is not my native language, I just simplified in "Up since". No date found in the logs on /var/tmp/dietpi/logs
A question: because I've always did the upgrade from version to version, why I don't have the up-to-date banner but the one still coming from an old release?

@MichaIng
Copy link
Owner

I meant to use the birth date of those log files, like you currently to with /:

stat -c '%w' /var/tmp/dietpi/logs/fs_partition_resize.log | cut -f1 -d '.'

About your question: /boot/dietpi/.dietpi-banner_custom is a config file that is not touched with DietPi updates, so any custom banner entry survives updates, if this is what you mean. Only /boot/dietpi/func/dietpi-banner is updated.

@dentaku65
Copy link
Author

dentaku65 commented Nov 22, 2024

I meant to use the birth date of those log files, like you currently to with /:

stat -c '%w' /var/tmp/dietpi/logs/fs_partition_resize.log | cut -f1 -d '.'

Got the point.

About your question: /boot/dietpi/.dietpi-banner_custom is a config file that is not touched with DietPi updates, so any custom banner entry survives updates, if this is what you mean. Only /boot/dietpi/func/dietpi-banner is updated.

In this case I meant I don't have "Uptime" from your screenshot... but perhaps I commented out on some my experiment during the years which I forgot atm :-)

@MichaIng
Copy link
Owner

Uptime is not enabled by default. Run dietpi-banner command to toggle options.

@dentaku65
Copy link
Author

Done!

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

No branches or pull requests

2 participants