mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
Remove hard-coded paths to system tools available in $PATH
This patch implemements a new feature of libite v1.9.1, whichp(), which instead of fexist() that requires an absolute path, searches $PATH. For reference, see issue #69 and PRs #70 and #72. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
30822f0d68
commit
9c6e046d93
5 files changed
+23
-24
No files matched your search
@@ -26,11 +26,11 @@
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
|
||||
#define ALSACTL "/usr/sbin/alsactl"
|
||||
#define ALSACTL "alsactl"
|
||||
|
||||
static void save(void *arg)
|
||||
{
|
||||
if (fexist(ALSACTL)) {
|
||||
if (whichp(ALSACTL)) {
|
||||
_d("Saving sound settings ...");
|
||||
run_interactive(ALSACTL " -g store", "Saving sound settings");
|
||||
}
|
||||
@@ -38,7 +38,7 @@ static void save(void *arg)
|
||||
|
||||
static void restore(void *arg)
|
||||
{
|
||||
if (fexist(ALSACTL)) {
|
||||
if (whichp(ALSACTL)) {
|
||||
_d("Restoring sound settings ...");
|
||||
run_interactive(ALSACTL " -g restore", "Restoring sound settings");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user