def initial_ave():
# create /etc/ave/user if it doesn't exist
import ave.config
try:
user = ave.config.create_etc()
except Exception, e:
print('ERROR: Installation failed: %s' % e)
return 1
# become the run-as user before checking/generating config files
try:
import ave.persona
home = ave.persona.become_user(user)
except Exception, e:
print('ERROR: Could not become user %s' % user)
return 2
# create the default AVE configuration
try:
ave.config.create_default(home)
except Exception, e:
print(
'ERROR: Could not create configuration files for %s: %s'
% (user, str(e))
)
return 3
评论列表
文章目录