diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-11-26 17:46:11 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-11-26 17:46:11 +0000 |
commit | 720cf2d972c1fe64a35a768e7f5d06d7ee414fe3 (patch) | |
tree | 57a580bb82ef9f2b4ff92e3b437da8455301a8a2 | |
parent | 2a77c31ec00dc5bfd8eb89d6773b7d157ced2039 (diff) | |
download | definitions-720cf2d972c1fe64a35a768e7f5d06d7ee414fe3.tar.gz |
fix mount and umounts
-rwxr-xr-x | installer/installer.py | 9 |
1 files 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 |