View previous topic :: View next topic |
Author |
Message |
sligo Tux's lil' helper
Joined: 17 Oct 2011 Posts: 93
|
Posted: Thu Nov 12, 2015 10:08 am Post subject: [SOLVED] get a directory into /run for custom project |
|
|
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 |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Nov 12, 2015 10:35 am Post subject: |
|
|
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 |
|
|
sligo Tux's lil' helper
Joined: 17 Oct 2011 Posts: 93
|
Posted: Thu Nov 12, 2015 10:42 am Post subject: |
|
|
I got it. Thanks allot! |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Fri Nov 13, 2015 3:07 pm Post subject: |
|
|
You're very welcome. :) |
|
Back to top |
|
|
|