Randy McMurchy wrote: > Hi all, > > Excuse my ignorance on this subject as the /run filesystem is new to > me and I am curious how everyone is handling directories in /run that > are expected to exist after a system reboot. Many packages create > directories during their installation procedure in /run (or /var/run, > which is the same due to the symlink). > > After a reboot, my understanding is that the tempfs filesystem mounted > at /run is recreated. Those directories that are created during some > package's installation procedure are then gone. Do these directories > get created when the package is started at boot-time, or are they > expected to be there?
Anything needed needs to be recreated. > I realize that /etc/sysconfig/createfiles exists and can be used to > create any directories required by packages before they are started at > boottime. However, the book does not mention doing this. Again, my > apologies for not being keen on the process. I would appreciate any > guidance on how y'all are handling the creation of these directories > that packages expect to exist, but do not after a system reboot. > > I have not rebooted my system after exiting chroot and starting in on > base BLFS packages, so I do not know what will happen after a reboot. > Currently in /run I have this: > > rml@rmlinux: ~/build > ls -lrt /run > total 48 > drwxr-xr-x 2 root root 40 Dec 17 09:11 lock > drwxr-xr-x 2 root root 60 Dec 17 09:11 mount > -rw-r--r-- 1 root root 4 Dec 17 15:11 syslogd.pid > -rw-r--r-- 1 root root 4 Dec 17 15:11 klogd.pid > -rw-r--r-- 1 root root 5 Dec 17 15:11 crond.pid > drwxr-xr-x 2 root root 60 Dec 18 09:40 var > drwxr-xr-x 2 mysql mysql 60 Dec 18 09:40 mysql > drwxr-xr-x 2 root root 40 Dec 18 15:51 openldap > -rw-r--r-- 1 root root 6 Dec 19 10:32 sshd.pid > drwxr-xr-x 5 root root 140 Dec 22 09:49 udev > -rw------- 1 root smmsp 44 Dec 22 14:24 sendmail.pid > drwxr-xr-x 2 root root 80 Dec 22 17:01 dbus > -rw-r--r-- 1 root root 4 Dec 28 04:46 authdigest_shm.3011 > srwx------ 1 apache root 0 Dec 28 04:46 cgisock.3011 > -rw-r--r-- 1 root root 5 Dec 28 04:46 httpd.pid > drwxr-xr-x 2 root root 40 Jan 7 12:23 pulse > drwxr-xr-x 3 root lp 80 Jan 9 19:33 cups > -rw-r--r-- 1 root root 6 Jan 9 19:58 nmbd.pid > -rw-r--r-- 1 root root 6 Jan 9 19:58 smbd.pid > drwxrwxrwt 2 root root 40 Jan 17 14:07 shm > drwxr-xr-x 2 root root 40 Jan 18 22:12 ConsoleKit > drwx------ 2 root root 40 Jan 19 15:42 NetworkManager > -rw-rw-r-- 1 root utmp 11136 Jan 21 09:15 utmp > > An example is the directory created by NetworkManager that has > permissions of 700. Is this directory automatically recreated at > system boot, and if not, does NetworkManager expect it to exist? I don't use NM, but yes, they should be there. See the boot script mountvirtfs for an example. I have: drwxr-xr-x 2 root root 80 Dec 28 12:14 ConsoleKit drwxr-xr-x 2 avahi avahi 80 Dec 28 12:13 avahi-daemon -rw-r--r-- 1 root root 5 Dec 28 12:13 avahi-dnsconfd.pid drwxr-xr-x 3 root lp 80 Dec 28 12:13 cups drwxr-xr-x 2 root root 80 Dec 28 12:13 dbus srwxrwxrwx 1 root root 0 Dec 28 12:13 fcron.fifo -rw-r--r-- 1 root root 5 Dec 28 12:13 fcron.pid -rw-r--r-- 1 root root 5 Dec 28 12:13 klogd.pid drwxr-xr-x 3 root root 60 Dec 28 12:13 lock -rw-r--r-- 1 root root 4 Dec 28 12:13 ntp.pid -rw-r--r-- 1 root root 5 Dec 28 12:13 rpc.statd.pid -r--r--r-- 1 root root 0 Dec 28 12:13 rpcbind.lock srw-rw-rw- 1 root root 0 Dec 28 12:13 rpcbind.sock drwxrwxrwt 2 root root 100 Jan 21 14:09 shm -rw------- 1 root root 5 Dec 28 12:13 sm-notify.pid -rw-r--r-- 1 root root 5 Dec 28 12:13 sshd.pid -rw-r--r-- 1 root root 5 Dec 28 12:13 syslogd.pid drwxr-xr-x 5 root root 140 Jan 21 11:45 udev drwx------ 2 root root 40 Dec 28 12:45 udisks -rw-rw-r-- 1 root utmp 3840 Dec 28 21:26 utmp drwxr-xr-x 2 root root 40 Dec 28 12:13 var AFAIK, no program expects persistence in /var/run. It's runtime data. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page