comparison Makefile @ 1:0e3c9806a620

changes for centos7
author Carl Byington <carl@five-ten-sg.com>
date Thu, 02 Mar 2017 12:45:31 -0800
parents 524d6c83d8ad
children ecf6bac512ae
comparison
equal deleted inserted replaced
0:524d6c83d8ad 1:0e3c9806a620
5 r := $(shell grep Wrote: mylog | grep -v debuginfo | awk '{print $$2}') 5 r := $(shell grep Wrote: mylog | grep -v debuginfo | awk '{print $$2}')
6 b := $(shell basename ${r}) 6 b := $(shell basename ${r})
7 m := google-authenticator.pp 7 m := google-authenticator.pp
8 8
9 all: 9 all:
10 yum -y install pam-devel selinux-policy-devel
10 rpmbuild --rebuild google-authenticator-1.0-0.gita096a62.fc24.6.src.rpm >mylog 2>&1 11 rpmbuild --rebuild google-authenticator-1.0-0.gita096a62.fc24.6.src.rpm >mylog 2>&1
11 grep Wrote: mylog 12 grep Wrote: mylog
12 make -f /usr/share/selinux/devel/Makefile 13 make -f /usr/share/selinux/devel/Makefile
13
14 14
15 install: 15 install:
16 [ -f ${r} ] || /bin/false 16 [ -f ${r} ] || /bin/false
17 yum -y install ${r} 17 yum -y install ${r}
18 semodule -i ${m} 18 semodule -i ${m}
19 sed -i -e 's/PAM-1.0/PAM-1.0\nauth required pam_google_authenticator.so nullok/g' /etc/pam.d/sshd 19 sed -i -e 's/PAM-1.0/PAM-1.0\nauth required pam_google_authenticator.so nullok/g' /etc/pam.d/sshd
20 sed -i -e 's/^ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config 20 sed -i -e 's/^ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
21 service sshd restart 21 service sshd restart
22 22
23 install-centos7:
24 [ -f ${r} ] || /bin/false
25 yum -y install ${r}
26 sed -i -e 's/PAM-1.0/PAM-1.0\nauth required pam_google_authenticator.so nullok/g' /etc/pam.d/sshd
27 sed -i -e 's/^ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
28 systemctl restart sshd.service
23 29
24 setup: 30 setup:
25 google-authenticator 31 google-authenticator
26 # authenticator setup creates the file with the wrong label. 32 # authenticator setup creates the file with the wrong label.
27 restorecon ~/.google_authenticator 33 restorecon ~/.google_authenticator