mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Create /var/run/lvm directory during clvmd initialisation if missing.
We need to be sure that /var/run and /var/lock is always there. (E.g. these two directories could be using tmpfs which then loose all the content after reboot.)
This commit is contained in:
parent
7dfce0e467
commit
91106a4a2d
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.79 -
|
Version 2.02.79 -
|
||||||
===================================
|
===================================
|
||||||
|
Create /var/run/lvm directory during clvmd initialisation if missing.
|
||||||
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
|
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
|
||||||
Avoid revalidating the label cache immediately after scanning.
|
Avoid revalidating the label cache immediately after scanning.
|
||||||
Support scanning for a single VG in independent mdas.
|
Support scanning for a single VG in independent mdas.
|
||||||
|
@ -324,6 +324,7 @@ int main(int argc, char *argv[])
|
|||||||
int using_gulm = 0;
|
int using_gulm = 0;
|
||||||
int debug_opt = 0;
|
int debug_opt = 0;
|
||||||
int clusterwide_opt = 0;
|
int clusterwide_opt = 0;
|
||||||
|
mode_t old_mask;
|
||||||
|
|
||||||
/* Deal with command-line arguments */
|
/* Deal with command-line arguments */
|
||||||
opterr = 0;
|
opterr = 0;
|
||||||
@ -413,6 +414,16 @@ int main(int argc, char *argv[])
|
|||||||
be_daemon(start_timeout);
|
be_daemon(start_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dm_prepare_selinux_context(DEFAULT_RUN_DIR, S_IFDIR);
|
||||||
|
old_mask = umask(0077);
|
||||||
|
if (dm_create_dir(DEFAULT_RUN_DIR) == 0) {
|
||||||
|
DEBUGLOG("clvmd: unable to create %s directory\n",
|
||||||
|
DEFAULT_RUN_DIR);
|
||||||
|
umask(old_mask);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
umask(old_mask);
|
||||||
|
|
||||||
/* Create pidfile */
|
/* Create pidfile */
|
||||||
(void) dm_prepare_selinux_context(CLVMD_PIDFILE, S_IFREG);
|
(void) dm_prepare_selinux_context(CLVMD_PIDFILE, S_IFREG);
|
||||||
if (dm_create_lockfile(CLVMD_PIDFILE) == 0) {
|
if (dm_create_lockfile(CLVMD_PIDFILE) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user