|
Lines 66-83
Link Here
|
| 66 |
print >> sys.stderr, 'Aborted.' |
66 |
print >> sys.stderr, 'Aborted.' |
| 67 |
sys.exit(1) |
67 |
sys.exit(1) |
| 68 |
|
68 |
|
| 69 |
# install univention-debmirror |
69 |
# check whether univention-debmirror is installed and install it if needed |
| 70 |
print 'Installing univention-debmirror' |
|
|
| 71 |
ret = subprocess.call(['univention-install', '--yes', 'univention-debmirror']) |
| 72 |
if ret != 0: |
| 73 |
print >> sys.stderr, 'Error: Failed to install univention-debmirror' |
| 74 |
sys.exit(1) |
| 75 |
|
| 76 |
ret, msg = urepo.is_debmirror_installed() |
70 |
ret, msg = urepo.is_debmirror_installed() |
| 77 |
if not ret: |
71 |
if not ret: |
| 78 |
print >> sys.stderr, msg |
72 |
print >> sys.stderr, msg |
| 79 |
sys.exit(1) |
73 |
sys.exit(1) |
| 80 |
|
74 |
|
|
|
75 |
if ret != True: |
| 76 |
print 'Installing univention-debmirror' |
| 77 |
ret = subprocess.call(['univention-install', '--yes', 'univention-debmirror']) |
| 78 |
if ret != 0: |
| 79 |
print >> sys.stderr, 'Error: Failed to install univention-debmirror' |
| 80 |
sys.exit(1) |
| 81 |
ret, msg = urepo.is_debmirror_installed() |
| 82 |
if not ret: |
| 83 |
print >> sys.stderr, msg |
| 84 |
sys.exit(1) |
| 85 |
|
| 81 |
|
86 |
|
| 82 |
def prepare(options): |
87 |
def prepare(options): |
| 83 |
""" Set local/repository and create directory structure """ |
88 |
""" Set local/repository and create directory structure """ |