Merge branch 'scriptdirs'

This commit is contained in:
Scott James Remnant 2010-03-02 20:40:54 +00:00
commit c99db3f7a9
6 changed files with 41 additions and 49 deletions

1
.gitignore vendored
View file

@ -27,6 +27,7 @@ aclocal.m4
stamp-*
*.rpm
plymouth
plymouth-generate-initrd
plymouth-populate-initrd
plymouth-set-default-theme
plymouth-log-viewer

View file

@ -208,6 +208,10 @@ AS_AC_EXPAND(PLYMOUTH_THEME_PATH, $plymouththemedir)
plymouthplugindir=$libdir/plymouth/
AS_AC_EXPAND(PLYMOUTH_PLUGIN_PATH, $plymouthplugindir)
AS_AC_EXPAND(PLYMOUTH_LIBDIR, $libdir)
AS_AC_EXPAND(PLYMOUTH_LIBEXECDIR, $libexecdir)
AS_AC_EXPAND(PLYMOUTH_DATADIR, $datadir)
AC_OUTPUT([Makefile
src/libply/Makefile
src/libply-splash-core/Makefile
@ -245,6 +249,9 @@ AC_OUTPUT([Makefile
themes/glow/Makefile
themes/script/Makefile
images/Makefile
scripts/plymouth-generate-initrd
scripts/plymouth-populate-initrd
scripts/plymouth-set-default-theme
scripts/Makefile
docs/Makefile
])

View file

@ -6,25 +6,9 @@ initrdscript_SCRIPTS = plymouth-update-initrd plymouth-generate-initrd plymouth-
sbinscriptsdir = $(sbindir)
sbinscripts_SCRIPTS = plymouth-set-default-theme
plymouth-populate-initrd: $(srcdir)/plymouth-populate-initrd.in
sed -e 's,[@]logofile[@],$(logofile),g' \
-e 's,[@]plymouthclientdir[@],$(plymouthclientdir),g' \
-e 's,[@]plymouthdaemondir[@],$(plymouthdaemondir),g' \
-e 's,[@]RELEASE_FILE[@],$(RELEASE_FILE),g' \
$(srcdir)/plymouth-populate-initrd.in > plymouth-populate-initrd
plymouth-set-default-theme: $(srcdir)/plymouth-set-default-theme.in
sed -e 's,[@]logofile[@],$(logofile),g' \
-e 's,[@]plymouthclientdir[@],$(plymouthclientdir),g' \
-e 's,[@]plymouthdaemondir[@],$(plymouthdaemondir),g' \
$(srcdir)/plymouth-set-default-theme.in > plymouth-set-default-theme
EXTRA_DIST= plymouth-update-initrd \
plymouth-generate-initrd \
plymouth-generate-initrd.in \
plymouth-populate-initrd.in \
plymouth-set-default-theme.in \
$(noinst_SCRIPTS) \
default.cfg
CLEANFILES = plymouth-populate-initrd plymouth-set-default-theme
MAINTAINERCLEANFILES = Makefile.in plymouth-populate-initrd plymouth-set-default-theme

View file

@ -2,11 +2,11 @@
[ -z "$DESTDIR" ] || exit 0
[ -z "$PLYMOUTH_LIBEXECDIR" ] && PLYMOUTH_LIBEXECDIR="/usr/libexec"
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="/usr/share"
[ -z "$PLYMOUTH_POPULATE_INITRD" ] && PLYMOUTH_POPULATE_INITRD="$PLYMOUTH_LIBEXECDIR/plymouth/plymouth-populate-initrd"
[ -z "$PLYMOUTH_LIBEXECDIR" ] && PLYMOUTH_LIBEXECDIR="@PLYMOUTH_LIBEXECDIR@"
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="@PLYMOUTH_DATADIR@"
[ -z "$PLYMOUTH_POPULATE_INITRD" ] && PLYMOUTH_POPULATE_INITRD="${PLYMOUTH_LIBEXECDIR}/plymouth/plymouth-populate-initrd"
[ -z "$PLYMOUTH_DESTDIR" ] && PLYMOUTH_DESTDIR="/boot"
[ -z "$PLYMOUTH_IMAGE_FILE" ] && PLYMOUTH_IMAGE_FILE="$PLYMOUTH_DESTDIR/initrd-plymouth.img"
[ -z "$PLYMOUTH_IMAGE_FILE" ] && PLYMOUTH_IMAGE_FILE="${PLYMOUTH_DESTDIR}/initrd-plymouth.img"
PLYMOUTH_INITRD_DIR="$(mktemp --tmpdir -d plymouth-XXXXXXX)"

View file

@ -2,20 +2,20 @@
[ -z "$DESTDIR" ] || exit 0
[ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec"
[ -z "$DATADIR" ] && DATADIR="/usr/share"
[ -z "$PLYMOUTH_LIBEXECDIR" ] && PLYMOUTH_LIBEXECDIR="@PLYMOUTH_LIBEXECDIR@"
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="@PLYMOUTH_DATADIR@"
[ -z "$PLYMOUTH_PLUGIN_PATH" ] && PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
[ -z "$PLYMOUTH_LOGO_FILE" ] && PLYMOUTH_LOGO_FILE="@logofile@"
[ -z "$PLYMOUTH_THEME_NAME" ] && PLYMOUTH_THEME_NAME=$(plymouth-set-default-theme)
if [ -z "$PLYMOUTH_POPULATE_SOURCE_FUNCTIONS" ]; then
if [ -f "${LIBEXECDIR}/initrd-functions" ]; then
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="${LIBEXECDIR}/initrd-functions"
if [ -f "${PLYMOUTH_LIBEXECDIR}/initrd-functions" ]; then
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="${PLYMOUTH_LIBEXECDIR}/initrd-functions"
fi
if [ -f "${DATADIR}/dracut/dracut-functions" ]; then
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="${DATADIR}/dracut/dracut-functions"
if [ -f "${PLYMOUTH_DATADIR}/dracut/dracut-functions" ]; then
PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="${PLYMOUTH_DATADIR}/dracut/dracut-functions"
fi
fi
@ -69,12 +69,12 @@ set_verbose $verbose || :
[ -z "$INITRDDIR" ] && usage error
mkdir -p ${INITRDDIR}${DATADIR}/plymouth/themes
mkdir -p ${INITRDDIR}${PLYMOUTH_DATADIR}/plymouth/themes
inst /sbin/plymouthd $INITRDDIR /bin/plymouthd
inst /bin/plymouth $INITRDDIR
inst ${DATADIR}/plymouth/themes/text/text.plymouth $INITRDDIR
inst ${PLYMOUTH_DATADIR}/plymouth/themes/text/text.plymouth $INITRDDIR
inst ${PLYMOUTH_PLUGIN_PATH}/text.so $INITRDDIR
inst ${DATADIR}/plymouth/themes/details/details.plymouth $INITRDDIR
inst ${PLYMOUTH_DATADIR}/plymouth/themes/details/details.plymouth $INITRDDIR
inst ${PLYMOUTH_PLUGIN_PATH}/details.so $INITRDDIR
inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR
inst @RELEASE_FILE@ $INITRDDIR
@ -84,7 +84,7 @@ if [ -z "$PLYMOUTH_THEME_NAME" ]; then
exit 1
fi
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
@ -96,15 +96,15 @@ inst ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so $INITRDDIR
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so $INITRDDIR
inst ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so $INITRDDIR
if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
for x in ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do
if [ -d ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
for x in ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do
[ ! -f "$x" ] && break
inst $x $INITRDDIR
done
fi
if [ -L ${DATADIR}/plymouth/themes/default.plymouth ]; then
cp -a ${DATADIR}/plymouth/themes/default.plymouth $INITRDDIR${DATADIR}/plymouth/themes
if [ -L ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ]; then
cp -a ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth $INITRDDIR${PLYMOUTH_DATADIR}/plymouth/themes
fi
# vim:ts=8:sw=4:sts=4:et

View file

@ -2,14 +2,14 @@
set -e
[ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec"
[ -z "$DATADIR" ] && DATADIR="/usr/share"
[ -z "$PLYMOUTH_LIBEXECDIR" ] && PLYMOUTH_LIBEXECDIR="@PLYMOUTH_LIBEXECDIR@"
[ -z "$PLYMOUTH_DATADIR" ] && PLYMOUTH_DATADIR="@PLYMOUTH_DATADIR@"
if [ -z "$PLYMOUTH_PLUGIN_PATH" ]; then
if [ -z "$LIB" ]; then
PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
else
[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB"
PLYMOUTH_PLUGIN_PATH=${LIBDIR}/plymouth/
[ -z "$PLYMOUTH_LIBDIR" ] && PLYMOUTH_LIBDIR="@PLYMOUTH_LIBDIR@"
PLYMOUTH_PLUGIN_PATH=${PLYMOUTH_LIBDIR}/plymouth/
fi
fi
@ -34,7 +34,7 @@ EOF
function list_themes ()
{
for theme in ${DATADIR}/plymouth/themes/*/*.plymouth; do
for theme in ${PLYMOUTH_DATADIR}/plymouth/themes/*/*.plymouth; do
[ -f $theme ] || continue;
echo "$(basename $theme .plymouth)"
done
@ -42,10 +42,10 @@ function list_themes ()
function get_default_theme ()
{
THEME_NAME=$(basename $(readlink ${DATADIR}/plymouth/themes/default.plymouth) .plymouth)
THEME_NAME=$(basename $(readlink ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth) .plymouth)
if [ "$THEME_NAME" = ".plymouth" ]; then
$0 --reset
THEME_NAME=$(basename $(readlink ${DATADIR}/plymouth/themes/default.plymouth) .plymouth)
THEME_NAME=$(basename $(readlink ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth) .plymouth)
fi
[ "$THEME_NAME" = ".so" ] || echo $THEME_NAME && exit 1
}
@ -144,27 +144,27 @@ if [ `id -u` -ne 0 ]; then
fi
if [ $DO_RESET -ne 0 ]; then
THEME_NAME=$(basename $(ls -1 -t ${DATADIR}/plymouth/themes/*/*.plymouth 2> /dev/null | tail -n 1) .plymouth)
THEME_NAME=$(basename $(ls -1 -t ${PLYMOUTH_DATADIR}/plymouth/themes/*/*.plymouth 2> /dev/null | tail -n 1) .plymouth)
if [ $THEME_NAME = .plymouth ]; then
rm -f ${DATADIR}/plymouth/themes/default.plymouth
rm -f ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth
exit 0
fi
fi
if [ ! -e ${DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth ]; then
echo "${DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth does not exist" > /dev/stderr
if [ ! -e ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth ]; then
echo "${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth does not exist" > /dev/stderr
exit 1
fi
MODULE_NAME=$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
if [ ! -e ${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so ]; then
echo "${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so does not exist" > /dev/stderr
exit 1
fi
(cd ${DATADIR}/plymouth/themes;
(cd ${PLYMOUTH_DATADIR}/plymouth/themes;
ln -sf ${THEME_NAME}/${THEME_NAME}.plymouth default.plymouth && \
([ $DO_INITRD_REBUILD -ne 0 ] && \
$LIBEXECDIR/plymouth/plymouth-update-initrd) || :)
${PLYMOUTH_LIBEXECDIR}/plymouth/plymouth-update-initrd) || :)