iutil.execWithRedirect() stopped doing anything with searchPath in 2006
when clumens committed d0dec24. Remove these silly vestigal bits.
---
anaconda | 3 +--
baseudev.py | 4 ++--
iutil.py | 6 +-----
livecd.py | 3 +--
packages.py | 5 ++---
storage/devicelibs/crypto.py | 6 ++----
storage/devicelibs/swap.py | 6 ++----
storage/fcoe.py | 3 +--
storage/formats/fs.py | 11 ++++-------
textw/timezone_text.py | 2 +-
yuminstall.py | 1 -
11 files changed, 17 insertions(+), 33 deletions(-)
diff --git a/anaconda b/anaconda
index 6b33988..8b863c5 100755
--- a/anaconda
+++ b/anaconda
@@ -411,8 +411,7 @@ def createSshKey(algorithm, keyfile):
so = "/tmp/ssh-keygen-%s-stdout.log" % (algorithm,)
se = "/tmp/ssh-keygen-%s-stderr.log" % (algorithm,)
- iutil.execWithRedirect('ssh-keygen', argv, stdout=so, stderr=se,
- searchPath=1)
+ iutil.execWithRedirect('ssh-keygen', argv, stdout=so, stderr=se)
def startSsh():
if not flags.sshd:
diff --git a/baseudev.py b/baseudev.py
index bda4fd6..0eb66b8 100644
--- a/baseudev.py
+++ b/baseudev.py
@@ -90,11 +90,11 @@ def udev_settle():
# lots of disks, or with slow disks
argv = ["settle", "--timeout=300"]
- iutil.execWithRedirect("udevadm", argv, stderr="/dev/null", searchPath=1)
+ iutil.execWithRedirect("udevadm", argv, stderr="/dev/null")
def udev_trigger(subsystem=None, action="add"):
argv = ["trigger", "--action=%s" % action]
if subsystem:
argv.append("--subsystem-match=%s" % subsystem)
- iutil.execWithRedirect("udevadm", argv, stderr="/dev/null", searchPath=1)
+ iutil.execWithRedirect("udevadm", argv, stderr="/dev/null")
diff --git a/iutil.py b/iutil.py
index bd1cca8..c279cc1 100644
--- a/iutil.py
+++ b/iutil.py
@@ -68,17 +68,13 @@ class tee(threading.Thread):
# @param stdin The file descriptor to read stdin from.
# @param stdout The file descriptor to redirect stdout to.
# @param stderr The file descriptor to redirect stderr to.
-# @param searchPath Should command be searched for in $PATH?
# @param root The directory to chroot to before running command.
# @return The return code of command.
def execWithRedirect(command, argv, stdin = None, stdout = None,
- stderr = None, searchPath = 0, root = '/'):
+ stderr = None, root = '/'):
def chroot ():
os.chroot(root)
- if not searchPath and not os.access (command, os.X_OK):
- raise RuntimeError, command + " can not be run"
-
stdinclose = stdoutclose = stderrclose = lambda : None
argv = list(argv)
diff --git a/livecd.py b/livecd.py
index c3449f5..47f049c 100644
--- a/livecd.py
+++ b/livecd.py
@@ -245,8 +245,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
"random",
rootDevice.path],
stdout="/dev/tty5",
- stderr="/dev/tty5",
- searchPath = 1)
+ stderr="/dev/tty5")
# and now set the uuid in the storage layer
rootDevice.updateSysfsPath()
iutil.notify_kernel("/sys%s" %rootDevice.sysfsPath)
diff --git a/packages.py b/packages.py
index bf1b02e..79cb9a5 100644
--- a/packages.py
+++ b/packages.py
@@ -92,8 +92,7 @@ def turnOnFilesystems(anaconda):
# turn off any swaps that we didn't turn on
# needed for live installs
iutil.execWithRedirect("swapoff", ["-a"],
- stdout = "/dev/tty5", stderr="/dev/tty5",
- searchPath = 1)
+ stdout = "/dev/tty5", stderr="/dev/tty5")
anaconda.id.storage.devicetree.teardownAll()
upgrade_migrate = False
@@ -321,7 +320,7 @@ def recreateInitrd (kernelTag, instRoot):
iutil.execWithRedirect("/sbin/new-kernel-pkg",
[ "--mkinitrd", "--dracut", "--depmod", "--install", kernelTag ],
stdout = "/dev/null", stderr = "/dev/null",
- searchPath = 1, root = instRoot)
+ root = instRoot)
def betaNagScreen(anaconda):
publicBetas = { "Red Hat Linux": "Red Hat Linux Public Beta",
diff --git a/storage/devicelibs/crypto.py b/storage/devicelibs/crypto.py
index 5e7a824..136435d 100644
--- a/storage/devicelibs/crypto.py
+++ b/storage/devicelibs/crypto.py
@@ -147,8 +147,7 @@ def luks_add_key(device,
rc = iutil.execWithRedirect("cryptsetup", params,
stdin = p[0],
stdout = "/dev/tty5",
- stderr = "/dev/tty5",
- searchPath = 1)
+ stderr = "/dev/tty5")
os.close(p[0])
if rc:
@@ -185,8 +184,7 @@ def luks_remove_key(device,
rc = iutil.execWithRedirect("cryptsetup", params,
stdin = p[0],
stdout = "/dev/tty5",
- stderr = "/dev/tty5",
- searchPath = 1)
+ stderr = "/dev/tty5")
os.close(p[0])
if rc:
diff --git a/storage/devicelibs/swap.py b/storage/devicelibs/swap.py
index d83c730..d037d80 100644
--- a/storage/devicelibs/swap.py
+++ b/storage/devicelibs/swap.py
@@ -86,8 +86,7 @@ def swapon(device, priority=None):
rc = iutil.execWithRedirect("swapon",
argv,
stderr = "/dev/tty5",
- stdout = "/dev/tty5",
- searchPath=1)
+ stdout = "/dev/tty5")
if rc:
raise SwapError("swapon failed for '%s'" % device)
@@ -95,8 +94,7 @@ def swapon(device, priority=None):
def swapoff(device):
rc = iutil.execWithRedirect("swapoff", [device],
stderr = "/dev/tty5",
- stdout = "/dev/tty5",
- searchPath=1)
+ stdout = "/dev/tty5")
if rc:
raise SwapError("swapoff failed for '%s'" % device)
diff --git a/storage/fcoe.py b/storage/fcoe.py
index 5a09f5d..fb42be7 100644
--- a/storage/fcoe.py
+++ b/storage/fcoe.py
@@ -33,8 +33,7 @@ def has_fcoe():
global _fcoe_module_loaded
if not _fcoe_module_loaded:
iutil.execWithRedirect("modprobe", [ "fcoe" ],
- stdout = "/dev/tty5", stderr="/dev/tty5",
- searchPath = 1)
+ stdout = "/dev/tty5", stderr="/dev/tty5")
_fcoe_module_loaded = True
return os.access("/sys/module/fcoe", os.X_OK)
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 5c64b09..3aee981 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -399,8 +399,7 @@ class FS(DeviceFormat):
rc = iutil.execWithRedirect(self.migratefsProg,
argv,
stdout = "/dev/tty5",
- stderr = "/dev/tty5",
- searchPath = 1)
+ stderr = "/dev/tty5")
except Exception as e:
raise FSMigrateError("filesystem migration failed: %s" % e,
self.device)
@@ -550,8 +549,8 @@ class FS(DeviceFormat):
for module in self._modules:
try:
rc = iutil.execWithRedirect("modprobe", [module],
- stdout="/dev/tty5", stderr="/dev/tty5",
- searchPath=1)
+ stdout="/dev/tty5",
+ stderr="/dev/tty5")
except Exception as e:
log.error("Could not load kernel module %s: %s" % (module, e))
self._supported = False
@@ -672,8 +671,7 @@ class FS(DeviceFormat):
argv = self._getLabelArgs(label)
rc = iutil.execWithRedirect(self.labelfsProg,
argv,
- stderr="/dev/tty5",
- searchPath=1)
+ stderr="/dev/tty5")
if rc:
raise FSError("label failed")
@@ -920,7 +918,6 @@ class Ext2FS(FS):
rc = iutil.execWithRedirect("tune2fs",
["-c0", "-i0",
"-ouser_xattr,acl", self.device],
- searchPath = True,
stdout = "/dev/tty5",
stderr = "/dev/tty5")
except Exception as e:
diff --git a/textw/timezone_text.py b/textw/timezone_text.py
index 6245ed5..a69328d 100644
--- a/textw/timezone_text.py
+++ b/textw/timezone_text.py
@@ -46,7 +46,7 @@ class TimezoneWindow:
if self.c.selected():
args.append("--utc")
- iutil.execWithRedirect("hwclock", args, searchPath=1)
+ iutil.execWithRedirect("hwclock", args)
self.g.setTimer(500)
self.updateClock()
diff --git a/yuminstall.py b/yuminstall.py
index e51d1b8..c57d360 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1719,7 +1719,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
try:
iutil.execWithRedirect("yum", ["clean", "all"],
stdout="/dev/tty5", stderr="/dev/tty5",
- searchPath = 1,
root = anaconda.rootPath)
except:
pass