From 65c2cffc6af7490d49544345b1391603b2de43c0 Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Wed, 19 Oct 2016 17:25:54 +0300 Subject: [PATCH] Fix sshcommand on CentOS with sudo CentOS 7 resets path with $ sudo by default Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin --- rpm.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpm.mk b/rpm.mk index 083189b29..1d430a9a3 100644 --- a/rpm.mk +++ b/rpm.mk @@ -124,15 +124,15 @@ rpm-plugn: rpm-sshcommand: rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_RPM_PACKAGE_NAME) - mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin + mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin @echo "-> Downloading package" wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL) @echo "-> Copying files into place" - mkdir -p "/tmp/build/usr/local/bin" - cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand - chmod +x /tmp/build/usr/local/bin/sshcommand + mkdir -p "/tmp/build/usr/bin" + cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/bin/sshcommand + chmod +x /tmp/build/usr/bin/sshcommand @echo "-> Creating $(SSHCOMMAND_RPM_PACKAGE_NAME)" sudo fpm -t rpm -s dir -C /tmp/build -n sshcommand \