From 720cf2d972c1fe64a35a768e7f5d06d7ee414fe3 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 26 Nov 2014 17:46:11 +0000 Subject: fix mount and umounts --- installer/installer.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/installer/installer.py b/installer/installer.py index df9d338d..f84df062 100755 --- a/installer/installer.py +++ b/installer/installer.py @@ -108,17 +108,12 @@ class BaserockInstaller(): return mounted def mount(self, partition, mount_point, fstype): - fstype = '-t %s' % fstype - mount_command = "mount %s %s %s" % (partition, mount_point, fstype) - child = subprocess.Popen(mount_command, shell=True) - child.communicate()[0] - return child.returncode + return subprocess.call(['mount', partition, mount_point, '-t', fstype]) def do_unmounts(self, to_unmount): for path in reversed(to_unmount): print 'Unmounting %s' % path - unmount_command = "umount %s" % (path) - subprocess.Popen(unmount_command, shell=True) + subprocess.Popen(['umount', path]) def check_and_read_config(self, config_file): print "Reading configuration from %s..." % config_file -- cgit v1.2.1