[PATCH 2/3] cpupowerutils: Use sbindir for binaries that need root privileges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cpufreq-aperf:
   - Must be run as root or it exits with a related error message.
   - It should not be used by any scripts

cpufreq-set:
I am not sure whether above is true for cpufreq-set as well.
I expect it always must be called as root and thus should be in sbindir.


Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
CC: linux@xxxxxxxxxxxxxxxxxxxx
CC: cpufreq@xxxxxxxxxxxxxxx
---
 Makefile |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a53b440..865c9f8 100644
--- a/Makefile
+++ b/Makefile
@@ -228,7 +228,11 @@ install-lib:
 
 install-tools:
 	$(INSTALL) -d $(DESTDIR)${bindir}
-	$(INSTALL_PROGRAM) $(UTIL_BINS) $(DESTDIR)${bindir}
+	$(INSTALL_PROGRAM) utils/cpufreq-info utils/cpuidle-info \
+                  $(DESTDIR)${bindir}
+	$(INSTALL) -d $(DESTDIR)${sbindir}
+	$(INSTALL_PROGRAM) utils/cpufreq-set utils/cpufreq-aperf \
+                  $(DESTDIR)${sbindir}
 
 install-man:
 	$(INSTALL_DATA) -D man/cpufreq-set.1 $(DESTDIR)${mandir}/man1/cpufreq-set.1
@@ -251,9 +255,9 @@ uninstall:
 	- rm -f $(DESTDIR)${libdir}/libcpupower.*
 	- rm -f $(DESTDIR)${libdir}/libcpufreq.*
 	- rm -f $(DESTDIR)${includedir}/cpufreq.h
-	- rm -f $(DESTDIR)${bindir}/cpufreq-set
+	- rm -f $(DESTDIR)${sbindir}/cpufreq-set
 	- rm -f $(DESTDIR)${bindir}/cpufreq-info
-	- rm -f $(DESTDIR)${bindir}/cpufreq-aperf
+	- rm -f $(DESTDIR)${sbindir}/cpufreq-aperf
 	- rm -f $(DESTDIR)${bindir}/cpuidle-info
 	- rm -f $(DESTDIR)${mandir}/man1/cpufreq-set.1
 	- rm -f $(DESTDIR)${mandir}/man1/cpufreq-info.1
-- 
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux