Fix sshcommand on CentOS with sudo

CentOS 7 resets path with $ sudo by default

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
This commit is contained in:
Edgars Beigarts
2016-10-19 17:25:54 +03:00
parent b771f0f809
commit 65c2cffc6a

8
rpm.mk
View File

@@ -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 \