Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] get a directory into /run for custom project
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
sligo
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2011
Posts: 93

PostPosted: Thu Nov 12, 2015 10:08 am    Post subject: [SOLVED] get a directory into /run for custom project Reply with quote

What would be the correct way of getting a directory created in /run? I would like to create a directory to put a .socket file there for a custom project but since /run is tmpfs, this directory will be lost when i create it by hand.

Last edited by sligo on Thu Nov 12, 2015 10:43 am; edited 1 time in total
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Nov 12, 2015 10:35 am    Post subject: Reply with quote

You should add a file to /etc/tmpfiles.d; see /lib/rc/sh/tmpfiles.sh which is run by /etc/init.d/tmpfiles.setup in line with systemd tmpfiles which afair (I helped write the script, but don't blame me for the awful style;) is the same as the initcpio setup in kernel.

You can install that as part of your ebuild, if your custom project is managed via ebuilds (highly recommended course of action.)
Back to top
View user's profile Send private message
sligo
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2011
Posts: 93

PostPosted: Thu Nov 12, 2015 10:42 am    Post subject: Reply with quote

I got it. Thanks allot!
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Nov 13, 2015 3:07 pm    Post subject: Reply with quote

You're very welcome. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum