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-12-02 17:58:47 +0000 |
commit | fe1d5ed5d3cc7da83cfde36149c2e269946c1e34 (patch) | |
tree | d99f0ebff1b352e915b12ed73b9ac2d418b7ca79 | |
parent | f2366f8908c3228a7b02e3c7031fac52e016fe61 (diff) | |
download | definitions-fe1d5ed5d3cc7da83cfde36149c2e269946c1e34.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 |