summaryrefslogtreecommitdiff
path: root/media-tv/plex-media-server/files/add_gentoo_profile_as_platform_version.patch
blob: eaf49067bf2c2cd8436370da2e83435432c0c19c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/usr/sbin/start_pms
+++ b/usr/sbin/start_pms
@@ -4,7 +4,8 @@
 export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release|awk -F= '{print $2}'|tr -d \" )"
 export PLEX_MEDIA_SERVER_INFO_DEVICE="PC"
 export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"
-export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release|awk -F= '{print $2}'|tr -d \" )"
+GENTOO_PROFILE="`readlink /etc/portage/make.profile`"
+export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="${GENTOO_PROFILE#.*/profiles/}"
 
 # change these parameters in /etc/plex/plexmediaserver
 export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6