[PATCH 1/2] populate-initrd: don't hardcode client and daemon path

Brett Witherspoon spoonb at cdspooner.com
Mon Oct 11 20:05:24 PDT 2010


When not installing in system root, the populate initrd script would not
install the client or daemon due to the paths being hardcoded.
Environmental variables are also now available to override the defaults.
---
 configure.ac                        |    3 +++
 scripts/plymouth-populate-initrd.in |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b5eddf5..091fe14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,9 @@ fi
 AC_SUBST(plymouthclientdir)
 AC_SUBST(plymouthdaemondir)
 
+AS_AC_EXPAND(PLYMOUTH_CLIENT_DIR, $plymouthclientdir)
+AS_AC_EXPAND(PLYMOUTH_DAEMON_DIR, $plymouthdaemondir)
+
 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])
 
diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in
index 7a2f0ca..52d43ae 100755
--- a/scripts/plymouth-populate-initrd.in
+++ b/scripts/plymouth-populate-initrd.in
@@ -9,6 +9,8 @@
 [ -z "$PLYMOUTH_THEME_NAME" ] && PLYMOUTH_THEME_NAME=$(plymouth-set-default-theme)
 [ -z "$PLYMOUTH_CONFDIR" ] && PLYMOUTH_CONFDIR="@PLYMOUTH_CONF_DIR@"
 [ -z "$PLYMOUTH_POLICYDIR" ] && PLYMOUTH_POLICYDIR="@PLYMOUTH_POLICY_DIR@"
+[ -z "$PLYMOUTH_DAEMON_PATH" ] && PLYMOUTH_DAEMON_PATH="@PLYMOUTH_DAEMON_DIR@/plymouthd"
+[ -z "$PLYMOUTH_CLIENT_PATH" ] && PLYMOUTH_CLIENT_PATH="@PLYMOUTH_CLIENT_DIR@/plymouth"
 
 if [ -z "$PLYMOUTH_POPULATE_SOURCE_FUNCTIONS" ]; then
 
@@ -72,8 +74,8 @@ set_verbose $verbose || :
 [ -z "$INITRDDIR" ] && usage error
 
 mkdir -p ${INITRDDIR}${PLYMOUTH_DATADIR}/plymouth/themes
-inst /sbin/plymouthd $INITRDDIR /bin/plymouthd
-inst /bin/plymouth $INITRDDIR
+inst ${PLYMOUTH_DAEMON_PATH} $INITRDDIR /bin/plymouthd
+inst ${PLYMOUTH_CLIENT_PATH} $INITRDDIR /bin/plymouth
 inst ${PLYMOUTH_DATADIR}/plymouth/themes/text/text.plymouth $INITRDDIR
 inst ${PLYMOUTH_PLUGIN_PATH}/text.so $INITRDDIR
 inst ${PLYMOUTH_DATADIR}/plymouth/themes/details/details.plymouth $INITRDDIR
-- 
1.7.2.3




More information about the plymouth mailing list