diff -r bf9a03c476fc -r 55146c78b3fb update_config_0.3.x-0.4.py --- a/update_config_0.3.x-0.4.py Fri Apr 18 03:46:11 2008 +0000 +++ b/update_config_0.3.x-0.4.py Mon Apr 21 04:56:01 2008 +0000 @@ -10,8 +10,14 @@ cf = ConfigParser() cf.readfp(cff) cff.close() -if not cf.has_option('misc', 'transport'): + +if not cf.has_option('misc', 'transport') or not cf.has_section('services'): cff = file('/usr/local/etc/vmm.cfg', 'w') - cf.set('misc', 'transport', 'dovecot:') + if not cf.has_option('misc', 'transport'): + cf.set('misc', 'transport', 'dovecot:') + if not cf.has_section('services'): + cf.add_section('services') + for service in ['smtp', 'pop3', 'imap', 'managesieve']: + cf.set('services', service, 'true') cf.write(cff) cff.close()