mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 02:28:19 +02:00
allow to change system release filename with configure option
This commit is contained in:
parent
407059671a
commit
27a71289bd
4 changed files with 8 additions and 2 deletions
|
|
@ -116,6 +116,11 @@ AM_CONDITIONAL(ADD_DEFAULT_PLUGIN_LINK,
|
|||
-o "$default_plugin_name" = "details"])
|
||||
AC_SUBST(default_plugin_name)
|
||||
|
||||
AC_ARG_WITH(release-file, AC_HELP_STRING([--with-release-file=<path_to_release_file>], [Release File to use to detect distribution (by default /etc/system-reelase)]),RELEASE_FILE=${withval},RELEASE_FILE=/etc/system-release)
|
||||
|
||||
AC_SUBST(RELEASE_FILE)
|
||||
AC_DEFINE_UNQUOTED(RELEASE_FILE, "$RELEASE_FILE", [Release file path])
|
||||
|
||||
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
|
||||
|
||||
AC_DEFUN([PLYMOUTH_CC_TRY_FLAG], [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ 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
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ inst ${LIBDIR}/plymouth/text.so $INITRDDIR
|
|||
inst ${DATADIR}/plymouth/themes/details/details.plymouth $INITRDDIR
|
||||
inst ${LIBDIR}/plymouth/details.so $INITRDDIR
|
||||
inst ${PLYMOUTH_LOGO_FILE} $INITRDDIR
|
||||
inst /etc/system-release $INITRDDIR
|
||||
inst @RELEASE_FILE@ $INITRDDIR
|
||||
|
||||
if [ -z "$PLYMOUTH_THEME_NAME" ]; then
|
||||
echo "No default plymouth plugin is set" > /dev/stderr
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ get_os_string (void)
|
|||
char *buf, *pos, *pos2;
|
||||
struct stat sbuf;
|
||||
|
||||
fd = open("/etc/system-release", O_RDONLY);
|
||||
fd = open(RELEASE_FILE, O_RDONLY);
|
||||
if (fd == -1) return;
|
||||
if (fstat(fd, &sbuf) == -1) return;
|
||||
buf = calloc(sbuf.st_size + 1, sizeof(char));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue