2015-04-30 16:38:23 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# encoding: utf-8
|
|
|
|
# === openmamba-postinstall module for Calamares - <http://github.com/calamares> ===
|
|
|
|
#
|
|
|
|
# Copyright 2015, Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
#
|
|
|
|
|
|
|
|
import libcalamares
|
|
|
|
|
|
|
|
|
|
|
|
def run():
|
|
|
|
""" Complete setup after openmamba installation """
|
|
|
|
|
|
|
|
# fix root path ('/') permissions
|
|
|
|
libcalamares.utils.chroot_call(['chmod', '0755', '/'])
|
|
|
|
|
2015-08-17 20:49:30 +02:00
|
|
|
# remove bluetooth config with livecd hostname
|
|
|
|
libcalamares.utils.chroot_call(['rm', '-f', '/var/lib/bluetooth/*/config'])
|
|
|
|
|
2015-04-30 16:38:23 +02:00
|
|
|
# create user home
|
|
|
|
username = libcalamares.globalstorage.value("username")
|
|
|
|
|
2015-08-17 20:49:30 +02:00
|
|
|
libcalamares.utils.chroot_call(['cp', '-a', '/etc/skel', '/home/' . username ])
|
|
|
|
libcalamares.utils.chroot_call(['chmod', '0711', '/home/' . username ])
|
|
|
|
libcalamares.utils.chroot_call(['mkdir', '-p', '/home/' . username . '/.config/autostart' ])
|
|
|
|
libcalamares.utils.chroot_call(['ln', '-s', '/usr/share/openmamba/mambabase/mambabase-autostart.desktop',
|
2015-04-30 16:38:23 +02:00
|
|
|
'/home/' . username . '/.config/autostart/mambabase.desktop' ])
|
2015-08-17 20:49:30 +02:00
|
|
|
libcalamares.utils.chroot_call(['chown', '-R ', username . '.users', '/home/' . username ])
|
|
|
|
libcalamares.utils.chroot_call(['chown', '-R ', username . '.users', '/home/' . username . '/.config' ])
|
2015-04-30 16:38:23 +02:00
|
|
|
|
|
|
|
return None
|