Why shouldn't manifestutil and munkiimport use nfs, and why shouldn't it be the same function for both?

This commit is contained in:
Lars Fronius
2011-09-05 15:08:26 +02:00
parent 61ebf4150c
commit e45f31fe07
2 changed files with 12 additions and 2 deletions
+10 -2
View File
@@ -202,9 +202,17 @@ def mountRepoCLI():
repo_url = pref('repo_url')
if os.path.exists(repo_path):
return
os.mkdir(repo_path, 0777)
os.mkdir(repo_path)
print 'Attempting to mount fileshare %s:' % repo_url
cmd = ['/sbin/mount_afp', '-i', repo_url, repo_path]
if repo_url.startswith('afp:'):
cmd = ['/sbin/mount_afp', '-i', repo_url, repo_path]
elif repo_url.startswith('smb:'):
cmd = ['/sbin/mount_smbfs', repo_url[4:], repo_path]
elif repo_url.startswith('nfs:'):
cmd = ['/sbin/mount_nfs', repo_url, repo_path]
else:
print >> sys.stderr, 'Unsupported filesystem URL!'
return
retcode = subprocess.call(cmd)
if retcode:
os.rmdir(repo_path)
+2
View File
@@ -111,6 +111,8 @@ def mountRepoCLI():
cmd = ['/sbin/mount_afp', '-i', repo_url, repo_path]
elif repo_url.startswith('smb:'):
cmd = ['/sbin/mount_smbfs', repo_url[4:], repo_path]
elif repo_url.startswith('nfs:'):
cmd = ['/sbin/mount_nfs', repo_url, repo_path]
else:
print >> sys.stderr, 'Unsupported filesystem URL!'
return