diff options
author | Richard Jones <rjones@redhat.com> | 2010-03-26 10:10:16 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-03-26 13:36:30 +0000 |
commit | 9e0b31a2af26b8d58a44dd80993a5e73d4942307 (patch) | |
tree | 366ae63d35d8d233810434ec12b5b325485d4061 /daemon/modprobe.c | |
parent | 57c143da4d9b9e75e6da83ef3b8e8c0979c6f0f6 (diff) | |
download | libguestfs-9e0b31a2af26b8d58a44dd80993a5e73d4942307.tar.gz libguestfs-9e0b31a2af26b8d58a44dd80993a5e73d4942307.tar.xz libguestfs-9e0b31a2af26b8d58a44dd80993a5e73d4942307.zip |
appliance: Set $PATH instead of hard-coding paths to binaries everywhere.
Change the appliance so PATH includes common directories. Thus
we don't need to hard-code paths to binaries (eg. "/sbin/fdisk")
everywhere.
Diffstat (limited to 'daemon/modprobe.c')
-rw-r--r-- | daemon/modprobe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/daemon/modprobe.c b/daemon/modprobe.c index ac62b349..0d7318c3 100644 --- a/daemon/modprobe.c +++ b/daemon/modprobe.c @@ -28,15 +28,14 @@ int optgroup_linuxmodules_available (void) { - int r = access ("/sbin/modprobe", X_OK); - return r == 0; + return prog_exists ("modprobe"); } int do_modprobe (const char *module) { char *err; - int r = command (NULL, &err, "/sbin/modprobe", module, NULL); + int r = command (NULL, &err, "modprobe", module, NULL); if (r == -1) { reply_with_error ("%s", err); |