Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "rhel" os-release #94

Merged
merged 2 commits into from Oct 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions build_mesos
Expand Up @@ -224,7 +224,7 @@ function os_release {
function display_version {
local os="$( tr A-Z a-z <<<"$1" )" version="$( tr A-Z a-z <<<"$2" )"
case "$os" in
redhat|centos|debian|fedora) out "$os/${version%%.*}" ;; # Ignore minor versions
redhat|rhel|centos|debian|fedora) out "$os/${version%%.*}" ;; # Ignore minor versions
macosx) out "$os/${version%.*}" ;; # Ignore bug fix releases
*) out "$os/$version" ;;
esac
Expand Down Expand Up @@ -268,7 +268,7 @@ function init_scripts {
mkdir -p usr/bin
cp -p "$this"/mesos-init-wrapper usr/bin
case "$1" in
fedora/*|redhat/7|redhat/7.*|centos/7|centos/7.*)
fedora/*|redhat/7|redhat/7.*|centos/7|centos/7.*|rhel/7|rhel/7.*)
mkdir -p usr/lib/systemd/system
cp "$this"/systemd/master.systemd usr/lib/systemd/system/mesos-master.service
cp "$this"/systemd/slave.systemd usr/lib/systemd/system/mesos-slave.service ;;
Expand Down Expand Up @@ -311,15 +311,15 @@ function jars {
function pkg {
case "$linux" in
ubuntu/*|debian/*) deb_ ;;
centos/*|redhat/*|fedora/*) rpm_ ;;
centos/*|redhat/*|rhel/*|fedora/*) rpm_ ;;
*) err "Not sure how to package for: $linux" ;;
esac
}

function architecture {
case "$linux" in
ubuntu/*|debian/*) dpkg-architecture -qDEB_BUILD_ARCH ;;
centos/*|redhat/*|fedora/*) arch ;;
centos/*|redhat/*|rhel/*|fedora/*) arch ;;
*) err "Not sure how to determine arch for: $linux" ;;
esac
}
Expand Down Expand Up @@ -348,7 +348,9 @@ function rpm_ {

case "$linux" in
centos/6) libevent_devel_pkg=libevent2-devel ;;
rhel/6) libevent_devel_pkg=libevent2-devel ;;
centos/7) libevent_devel_pkg=libevent-devel ;;
rhel/7) libevent_devel_pkg=libevent-devel ;;
*) err "Unknown CentOS distribution: $linux" ;;
esac

Expand Down
3 changes: 3 additions & 0 deletions rhel/7/mesos.postinst
@@ -0,0 +1,3 @@
ldconfig
systemctl enable mesos-master
systemctl enable mesos-slave
2 changes: 2 additions & 0 deletions rhel/7/mesos.postrm
@@ -0,0 +1,2 @@
#rm -rf /var/log/mesos /etc/mesos

2 changes: 2 additions & 0 deletions rhel/mesos.postinst
@@ -0,0 +1,2 @@
ldconfig

2 changes: 2 additions & 0 deletions rhel/mesos.postrm
@@ -0,0 +1,2 @@
#rm -rf /var/log/mesos /etc/mesos