]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
allow to change system release filename with configure option
authorFrederic Crozat <fcrozat@mandriva.com>
Thu, 6 Aug 2009 08:37:46 +0000 (10:37 +0200)
committerFrederic Crozat <fcrozat@mandriva.com>
Tue, 11 Aug 2009 09:55:42 +0000 (11:55 +0200)
configure.ac
scripts/Makefile.am
scripts/plymouth-populate-initrd.in
src/libplybootsplash/ply-text-progress-bar.c

index ce1b84fc5b092ad8f323a727b8dcd73cf13a03bc..068dd07ba343db9d366ecab2762852814e20197d 100644 (file)
@@ -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], [
index 9c6e095d6ca05fc466147c6abe5e88b7b2c6f6b8..714bd03b277e3c1d903a9386aa6793594dec8c3e 100644 (file)
@@ -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
index d87f357ec8ce464391767621fcd8281fe3bc9380..09ccb3298bb05c6d7e2a83c070393cad952d9ef9 100755 (executable)
@@ -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
index d46df11b47030c58f251cd1d13af842b8370695b..1f972067cc971ad79112e4a5167591685220f4f2 100644 (file)
@@ -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));