Add openmamba-postinstall calamares module with home dir customization and / perms fix
5
Makefile
@ -13,6 +13,7 @@ exec_prefix = ${prefix}
|
|||||||
sysconfdir = /etc
|
sysconfdir = /etc
|
||||||
sbindir = /sbin
|
sbindir = /sbin
|
||||||
bindir = ${exec_prefix}/bin
|
bindir = ${exec_prefix}/bin
|
||||||
|
libdir = ${prefix}/lib
|
||||||
mandir = ${prefix}/usr/share/man
|
mandir = ${prefix}/usr/share/man
|
||||||
datadir = ${prefix}/share
|
datadir = ${prefix}/share
|
||||||
kdedatadir = ${kdeprefix}/share
|
kdedatadir = ${kdeprefix}/share
|
||||||
@ -61,6 +62,7 @@ install-dirs:
|
|||||||
@$(INSTALL_DIR) $(DESTDIR)/home/liveuser/
|
@$(INSTALL_DIR) $(DESTDIR)/home/liveuser/
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/systemd/system/
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/systemd/system/
|
||||||
|
@$(INSTALL_DIR) $(DESTDIR)$(libdir)/calamares/modules/
|
||||||
|
|
||||||
install-icons:
|
install-icons:
|
||||||
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
|
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
|
||||||
@ -73,7 +75,8 @@ install: install-dirs install-locales install-icons
|
|||||||
$(INSTALL_PROGRAM) liveuser-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/liveuser
|
$(INSTALL_PROGRAM) liveuser-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/liveuser
|
||||||
$(INSTALL_DATA) openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
|
$(INSTALL_DATA) openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
|
||||||
cp -a liveuser/.kde4 $(DESTDIR)/home/liveuser/
|
cp -a liveuser/.kde4 $(DESTDIR)/home/liveuser/
|
||||||
cp -a calamares $(DESTDIR)$(sysconfdir)/
|
cp -a calamares/etc/calamares $(DESTDIR)$(sysconfdir)/
|
||||||
|
cp -a calamares/openmamba-postinstall $(DESTDIR)$(libdir)/calamares/modules/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 748 KiB After Width: | Height: | Size: 748 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@ -52,6 +52,7 @@ install:
|
|||||||
- grub
|
- grub
|
||||||
- packages
|
- packages
|
||||||
#- bootloader
|
#- bootloader
|
||||||
|
- openmamba-postinstall
|
||||||
- umount
|
- umount
|
||||||
|
|
||||||
# Phase 3 - postinstall.
|
# Phase 3 - postinstall.
|
28
calamares/openmamba-postinstall/main.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/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', '/'])
|
||||||
|
|
||||||
|
# create user home
|
||||||
|
username = libcalamares.globalstorage.value("username")
|
||||||
|
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'cp', '-a', '/etc/skel', '/home/' . username ])
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'chmod', '0711', '/home/' . username ])
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'mkdir', '-p', '/home/' . username . '/.config/autostart' ])
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'ln', '-s', '/usr/share/openmamba/mambabase/mambabase-autostart.desktop',
|
||||||
|
'/home/' . username . '/.config/autostart/mambabase.desktop' ])
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'chown', '-R ', username . '.users', '/home/' . username ])
|
||||||
|
libcalamares.utils.chroot_call(['chroot', 'chown', '-R ', username . '.users', '/home/' . username . '/.config' ])
|
||||||
|
|
||||||
|
return None
|
6
calamares/openmamba-postinstall/module.desc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
type: "job"
|
||||||
|
name: "openmamba-postinstall"
|
||||||
|
interface: "python"
|
||||||
|
requires: []
|
||||||
|
script: "main.py"
|