diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index f17da88..b0fb6e3 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -393,7 +393,11 @@ EOF
uname = `uname`.strip
raise "uname failed" unless $?.success?
if uname == "Linux"
- distrib = `uname -a | grep -io -e Debian -e gentoo -e Ubuntu | sed -e 's|gentoo|Gentoo|'`.strip
+ if File.exist?("/etc/fedora-release")
+ distrib = `cat /etc/fedora-release | cut -d \ -f 1`
+ else
+ distrib = `uname -a | grep -io -e Debian -e gentoo -e Ubuntu | sed -e 's|gentoo|Gentoo|'`.strip
+ end
@@os_dir = "#{uname}/#{distrib}"
@@os = "#{uname}_#{distrib}"
else