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

tmpfiles: initctl command or native cleanup-age time #423

Open
aanderse opened this issue Feb 2, 2025 · 5 comments
Open

tmpfiles: initctl command or native cleanup-age time #423

aanderse opened this issue Feb 2, 2025 · 5 comments

Comments

@aanderse
Copy link
Contributor

aanderse commented Feb 2, 2025

i took a quick look and it doesn't seem like i can explicitly call tmpfiles functionality - no separate binary or invocation like initctl tmpfiles --clean/--create or whatever

i also didn't see any documentation for how often/when cleanup and creation functionality runs automatically...

maybe i missed documentation? and would it be possible to explicitly run tmpfiles, either as a separate executable or an initctl sub command?

thank you for your time and consideration 🙇‍♂

@troglobit
Copy link
Owner

You didn't miss anything. The Finit implementation of tmpfiles does not have any separate invocation to clean at runtime other than at system bootstrap, which is handled by the bootmisc plugin.

The tmpfiles support was mainly added to replace homegrown similar functionality to create package specific files, directories, etc. (also during bootstrap) with a more generic system.

@aanderse
Copy link
Contributor Author

aanderse commented Feb 2, 2025

right, the tmpfiles spec has proven to be immensely useful... so would you be ok with exposing the functionality as something we can explicitly call? i think a long running system would benefit from adding to a cron job so old files get cleaned up, etc...

@troglobit
Copy link
Owner

Well sure, but the current implementation has no code for cleaning, the x/X flags are ignored, so it's a bit of work to get it in place, debugged, tested, and released. I have no need for this myself atm, but if someone steps up to submit a patch I'm willing to consider it. If it's a cleanup command to initctl or native support in Finit for cleanup-age, doesn't matter, but I think the latter would be better for embedded systems that don't necessarily have crond.

@aanderse
Copy link
Contributor Author

aanderse commented Feb 2, 2025

ahh my mistake! i thought there was cleanup functionality. yes, i agree this doesn't make much sense. thanks for clarifying.

@aanderse aanderse closed this as completed Feb 2, 2025
@troglobit
Copy link
Owner

Reopening, because there might be other people who'd like to contribute.

@troglobit troglobit reopened this Feb 2, 2025
@troglobit troglobit changed the title explicitly calling tmpfiles? Enhanced tmpfiles support, initctl command or native cleanup-age time Feb 2, 2025
@troglobit troglobit changed the title Enhanced tmpfiles support, initctl command or native cleanup-age time tmpfiles: initctl command or native cleanup-age time Feb 2, 2025
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