]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
configure: Make runtimedir configurable
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 Oct 2019 08:22:43 +0000 (10:22 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sun, 13 Oct 2019 10:30:00 +0000 (12:30 +0200)
On modern systems we should use /run/plymouth to store things like the
pid file, instead of /var/run/plymouth, make the runtime dir configurable
with --with-runtimedir. This keeps the old default behavior of using
/var/run/plymouth, users can pass --with-runtimedir=/run to use
/run/plymouth instead.

Fixes: #75
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
configure.ac

index bdb50efedea8280c78c5f9bb5c58c99f97e420be..ada2e4d7be47e8cf16263275aef7f3372db245cc 100644 (file)
@@ -143,17 +143,25 @@ if test x$enable_systemd_integration = xyes; then
   AC_SUBST(SYSTEMD_UNIT_DIR)
 fi
 
+AC_ARG_WITH([runtimedir],
+            AC_HELP_STRING([--with-runtimedir=DIR], [runtime data dir [LOCALSTATEDIR/run]]),
+            [plymouthruntimedir=${withval}/plymouth], [plymouthruntimedir=""])
+
 AC_ARG_WITH(system-root-install, AS_HELP_STRING([--with-system-root-install],[Install client in /bin and daemon in /sbin]),with_system_root_install=${withval},with_system_root_install=no)
 AM_CONDITIONAL(WITH_SYSTEM_ROOT_INSTALL,  [test "$with_system_root_install" = yes])
 
 if test x$with_system_root_install = xyes; then
   plymouthclientdir=/bin
   plymouthdaemondir=/sbin
-  plymouthruntimedir=/run/plymouth
+  if (test -z "${plymouthruntimedir}"); then
+    plymouthruntimedir=/run/plymouth
+  fi
 else
   plymouthclientdir=$bindir
   plymouthdaemondir=$sbindir
-  plymouthruntimedir=$localstatedir/run/plymouth
+  if (test -z "${plymouthruntimedir}"); then
+    plymouthruntimedir=$localstatedir/run/plymouth
+  fi
 fi
 AC_SUBST(plymouthclientdir)
 AC_SUBST(plymouthdaemondir)