File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ function delete_pid_file {
2828 rm -f $PID_DIR /riak.pid
2929}
3030
31- # prevents centos8 su from contacting pam and printing the "Last logged in" message
32- if [ " ` cat /etc/redhat-release 2>&1 ` " = " CentOS Stream release 8" ]; then
31+ # centos7-based distros have a su that contacts pam and prints the "Last logged in" message
32+ if [ " ` cat /etc/redhat-release 2>&1 ` " = " CentOS Stream release 8" ] ||
33+ [ " ` cat /etc/system-release 2>&1 ` " = " Amazon Linux release 2 (Karoo)" ]; then
3334 SU=" su --session-command"
3435else
3536 SU=su
Original file line number Diff line number Diff line change @@ -12,9 +12,16 @@ DEPS_DIR ?= deps
1212# #
1313ifeq ($(OS ) ,Linux)
1414ARCH = $(shell uname -m)
15+ ISAMZ = $(shell cat /etc/system-release 2> /dev/null)
1516ISRPM = $(shell cat /etc/redhat-release 2> /dev/null)
17+ ISAMZ = $(shell cat /etc/system-release 2> /dev/null)
1618ISDEB = $(shell cat /etc/debian_version 2> /dev/null)
1719ISSLES = $(shell cat /etc/SuSE-release 2> /dev/null)
20+ ifneq ($(ISAMZ ) ,)
21+ OSNAME = Amazon
22+ PKGERDIR = rpm
23+ BUILDDIR = rpmbuild
24+ else
1825ifneq ($(ISRPM ) ,)
1926OSNAME = RedHat
2027PKGERDIR = rpm
@@ -32,6 +39,7 @@ BUILDDIR = rpmbuild
3239endif # SLES
3340endif # deb
3441endif # rpm
42+ endif # amazon
3543endif # linux
3644
3745ifeq ($(OS ) ,Darwin) # OSX
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vendor: "Riak"
2929Packager: "Riak Package Maint" <"
[email protected] ">
3030BuildRoot: %{_tmppath}/%{name}-%{_revision}-%{release}-root
3131Summary: "Riak is a distributed data store"
32- BuildRequires: systemd systemd-rpm-macros gcc-c++ pam-devel
32+ BuildRequires: systemd gcc-c++ pam-devel
3333Requires(post): systemd
3434Requires(preun): systemd
3535Requires(postun): systemd
You can’t perform that action at this time.
0 commit comments