]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: create runtime directory if it doesn't exist already
authorRay Strode <rstrode@redhat.com>
Thu, 31 Mar 2011 02:51:27 +0000 (22:51 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 31 Mar 2011 02:51:27 +0000 (22:51 -0400)
This makes sure there is a convenient place to put pid files.

configure.ac
src/Makefile.am
src/main.c

index efe7a8029f1b707018c2b5e2eba4765b2fa50286..ac92f113c7138fd6983d4b297525cecde80cc743 100644 (file)
@@ -255,15 +255,19 @@ AM_CONDITIONAL(WITH_SYSTEM_ROOT_INSTALL,  [test "$with_system_root_install" = ye
 if test x$with_system_root_install = xyes; then
   plymouthclientdir=/bin
   plymouthdaemondir=/sbin
+  plymouthruntimedir=/run/plymouth
 else
   plymouthclientdir=$bindir
   plymouthdaemondir=$sbindir
+  plymouthruntimedir=$localstatedir/run/plymouth
 fi
 AC_SUBST(plymouthclientdir)
 AC_SUBST(plymouthdaemondir)
+AC_SUBST(plymouthruntimedir)
 
 AS_AC_EXPAND(PLYMOUTH_CLIENT_DIR, $plymouthclientdir)
 AS_AC_EXPAND(PLYMOUTH_DAEMON_DIR, $plymouthdaemondir)
+AS_AC_EXPAND(PLYMOUTH_RUNTIME_DIR, $plymouthruntimedir)
 
 AC_ARG_WITH(rhgb-compat-link, AS_HELP_STRING([--with-rhgb-compat-link],[Install /usr/bin/rhgb-client compatability symlink]),with_rhgb_compat_link=${withval},with_rhgb_compat_link=yes)
 AM_CONDITIONAL(WITH_RHGB_COMPAT_LINK,  [test "$with_rhgb_compat_link" = yes])
index c6de8263a47f2eb480fe213b80e7c2e1e344bdb6..a9e6eb171df7fc050650dd85a4cc5ed6d4962cfb 100644 (file)
@@ -18,6 +18,7 @@ plymouthd_CFLAGS = $(PLYMOUTH_CFLAGS)                                         \
                   -DPLYMOUTH_PLUGIN_PATH=\"$(PLYMOUTH_PLUGIN_PATH)\"         \
                   -DPLYMOUTH_THEME_PATH=\"$(PLYMOUTH_THEME_PATH)/\"          \
                   -DPLYMOUTH_POLICY_DIR=\"$(PLYMOUTH_POLICY_DIR)/\"          \
+                  -DPLYMOUTH_RUNTIME_DIR=\"$(PLYMOUTH_RUNTIME_DIR)\"         \
                   -DPLYMOUTH_CONF_DIR=\"$(PLYMOUTH_CONF_DIR)/\"
 plymouthd_LDADD = $(PLYMOUTH_LIBS) libply/libply.la libply-splash-core/libply-splash-core.la
 plymouthd_SOURCES =                                                            \
index ab974124703ca6545cbd0084e0008562da110403..25ccf2c0790aabd6ba6122e9ffb314683d79a4e3 100644 (file)
@@ -1955,6 +1955,10 @@ initialize_environment (state_t *state)
   else
     redirect_standard_io_to_device (state->default_tty);
 
+  ply_trace ("Making sure " PLYMOUTH_RUNTIME_DIR " exists");
+  if (!ply_create_directory (PLYMOUTH_RUNTIME_DIR))
+    ply_trace ("could not create " PLYMOUTH_RUNTIME_DIR ": %m");
+
   ply_trace ("initialized minimal work environment");
   return true;
 }