DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] tools: remove chmod absolute path in setup.sh
@ 2015-03-12 17:18 Andre Richter
  2015-03-17 21:25 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Richter @ 2015-03-12 17:18 UTC (permalink / raw)
  To: dev

setup.sh uses /usr/bin/chmod, but depending on distribution, it is not always there.
For example, Ubuntu has /bin/chmod. Fix this by removing the absolute path, like it is
done e.g. with grep.
---
 tools/setup.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/setup.sh b/tools/setup.sh
index 245900f..ac438c2 100755
--- a/tools/setup.sh
+++ b/tools/setup.sh
@@ -220,7 +220,7 @@ load_vfio_module()
 
 	# make sure regular users can read /dev/vfio
 	echo "chmod /dev/vfio"
-	sudo /usr/bin/chmod a+x /dev/vfio
+	sudo chmod a+x /dev/vfio
 	if [ $? -ne 0 ] ; then
 		echo "FAIL"
 		quit
@@ -278,7 +278,7 @@ set_vfio_permissions()
 {
 	# make sure regular users can read /dev/vfio
 	echo "chmod /dev/vfio"
-	sudo /usr/bin/chmod a+x /dev/vfio
+	sudo chmod a+x /dev/vfio
 	if [ $? -ne 0 ] ; then
 		echo "FAIL"
 		quit
@@ -287,7 +287,7 @@ set_vfio_permissions()
 
 	# make sure regular user can access everything inside /dev/vfio
 	echo "chmod /dev/vfio/*"
-	sudo /usr/bin/chmod 0666 /dev/vfio/*
+	sudo chmod 0666 /dev/vfio/*
 	if [ $? -ne 0 ] ; then
 		echo "FAIL"
 		quit
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] tools: remove chmod absolute path in setup.sh
  2015-03-12 17:18 [dpdk-dev] [PATCH] tools: remove chmod absolute path in setup.sh Andre Richter
@ 2015-03-17 21:25 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-03-17 21:25 UTC (permalink / raw)
  To: Andre Richter; +Cc: dev

2015-03-12 18:18, Andre Richter:
> setup.sh uses /usr/bin/chmod, but depending on distribution, it is not always there.
> For example, Ubuntu has /bin/chmod. Fix this by removing the absolute path, like it is
> done e.g. with grep.

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-17 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 17:18 [dpdk-dev] [PATCH] tools: remove chmod absolute path in setup.sh Andre Richter
2015-03-17 21:25 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).