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:
1 file changed
+4
-4
@@ -124,15 +124,15 @@ rpm-plugn:
|
|||||||
|
|
||||||
rpm-sshcommand:
|
rpm-sshcommand:
|
||||||
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_RPM_PACKAGE_NAME)
|
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"
|
@echo "-> Downloading package"
|
||||||
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
||||||
|
|
||||||
@echo "-> Copying files into place"
|
@echo "-> Copying files into place"
|
||||||
mkdir -p "/tmp/build/usr/local/bin"
|
mkdir -p "/tmp/build/usr/bin"
|
||||||
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand
|
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/bin/sshcommand
|
||||||
chmod +x /tmp/build/usr/local/bin/sshcommand
|
chmod +x /tmp/build/usr/bin/sshcommand
|
||||||
|
|
||||||
@echo "-> Creating $(SSHCOMMAND_RPM_PACKAGE_NAME)"
|
@echo "-> Creating $(SSHCOMMAND_RPM_PACKAGE_NAME)"
|
||||||
sudo fpm -t rpm -s dir -C /tmp/build -n sshcommand \
|
sudo fpm -t rpm -s dir -C /tmp/build -n sshcommand \
|
||||||
|
|||||||
Reference in new issue
Block a user