diff --git a/configure.ac b/configure.ac index ce1b84f..068dd07 100644 --- a/configure.ac +++ b/configure.ac @@ -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=], [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], [ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 9c6e095..714bd03 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -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 diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in index d87f357..09ccb32 100755 --- a/scripts/plymouth-populate-initrd.in +++ b/scripts/plymouth-populate-initrd.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 diff --git a/src/libplybootsplash/ply-text-progress-bar.c b/src/libplybootsplash/ply-text-progress-bar.c index d46df11..1f97206 100644 --- a/src/libplybootsplash/ply-text-progress-bar.c +++ b/src/libplybootsplash/ply-text-progress-bar.c @@ -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));