summaryrefslogtreecommitdiffstats
path: root/booty/bootloaderInfo.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2009-04-17 16:39:24 -0700
committerJesse Keating <jkeating@redhat.com>2009-04-17 16:39:24 -0700
commit5e184c33a83eedc7dd71c5fc6a8e5586d6639d95 (patch)
tree93c4fe78721988bc34c1394d1abea529e8c179b3 /booty/bootloaderInfo.py
parentfc982ce3ae77d0ad8708a94a3d4ba46a4825773c (diff)
downloadanaconda-5e184c33a83eedc7dd71c5fc6a8e5586d6639d95.tar.gz
anaconda-5e184c33a83eedc7dd71c5fc6a8e5586d6639d95.tar.xz
anaconda-5e184c33a83eedc7dd71c5fc6a8e5586d6639d95.zip
Clean up argument list after changing from rhpl to iutil for execWithRedirect
iutil uses subprocess.Popen and passes in the argv as a list, which causes Popen to use the first entry of the list as the executable, and the rest of the entires as arguments to that executable. This is different from how rhpl did things in which the first argument of the arglist had to be the executable itself. Also iutil expects argv to be a real list not a tuple.
Diffstat (limited to 'booty/bootloaderInfo.py')
-rw-r--r--booty/bootloaderInfo.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
index b50a11a6c..dfd96d29b 100644
--- a/booty/bootloaderInfo.py
+++ b/booty/bootloaderInfo.py
@@ -67,12 +67,12 @@ def syncDataToDisk(dev, mntpt, instRoot = "/"):
# and xfs is even more "special" (#117968)
if isys.readFSType(dev) == "xfs":
iutil.execWithRedirect("/usr/sbin/xfs_freeze",
- ["/usr/sbin/xfs_freeze", "-f", mntpt],
+ ["-f", mntpt],
stdout = "/dev/tty5",
stderr = "/dev/tty5",
root = instRoot)
iutil.execWithRedirect("/usr/sbin/xfs_freeze",
- ["/usr/sbin/xfs_freeze", "-u", mntpt],
+ ["-u", mntpt],
stdout = "/dev/tty5",
stderr = "/dev/tty5",
root = instRoot)
@@ -534,7 +534,7 @@ class efiBootloaderInfo(bootloaderInfo):
# XXX wouldn't it be nice to have a real interface to use efibootmgr from?
def removeOldEfiEntries(self, instRoot):
p = os.pipe()
- iutil.execWithRedirect('/usr/sbin/efibootmgr', ["efibootmgr"],
+ iutil.execWithRedirect('/usr/sbin/efibootmgr', [],
root = instRoot, stdout = p[1])
os.close(p[1])
@@ -552,7 +552,7 @@ class efiBootloaderInfo(bootloaderInfo):
if string.join(fields[1:], " ") == productName:
entry = fields[0][4:8]
iutil.execWithRedirect('/usr/sbin/efibootmgr',
- ["efibootmgr", "-b", entry, "-B"],
+ ["-b", entry, "-B"],
root = instRoot,
stdout="/dev/tty5", stderr="/dev/tty5")
@@ -582,7 +582,7 @@ class efiBootloaderInfo(bootloaderInfo):
argv = [ "/usr/sbin/efibootmgr", "-c" , "-w", "-L",
productName, "-d", "/dev/%s" % bootdisk,
"-p", bootpart, "-l", "\\EFI\\redhat\\" + self.bootloader ]
- iutil.execWithRedirect(argv[0], argv, root = instRoot,
+ iutil.execWithRedirect(argv[0], argv[1:], root = instRoot,
stdout = "/dev/tty5",
stderr = "/dev/tty5")