From 4cec0f955a2502e8affebabd1c4f33fff29f1453 Mon Sep 17 00:00:00 2001 From: jean-michel <jean-michel@obarun.org> Date: Mon, 25 Mar 2019 15:52:27 +0100 Subject: [PATCH] studying layered trees and services oraganization --- plasma/customizeChroot | 86 ++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/plasma/customizeChroot b/plasma/customizeChroot index 5b7d468..488b2f1 100755 --- a/plasma/customizeChroot +++ b/plasma/customizeChroot @@ -9,36 +9,36 @@ # except according to the terms contained in the LICENSE file. sourcing(){ - - local list - - for list in /tmp/obarun-install-tmp/install.conf /usr/lib/obarun/util.sh; do - if [[ -f "${list}" ]]; then - source "${list}" - else - out_error "Missing file : ${list}" - exit - fi - done - - unset list + + local list + + for list in /tmp/obarun-install-tmp/install.conf /usr/lib/obarun/util.sh; do + if [[ -f "${list}" ]]; then + source "${list}" + else + out_error "Missing file : ${list}" + exit + fi + done + + unset list } sourcing custo_once() { - local _tmp cmd - cmd="${1}" - _tmp="/tmp/obarun-install-tmp" - - if [[ ! -d $_tmp ]]; then - mkdir -p -m0755 $_tmp || die "Impossible to create $_tmp" - fi + local _tmp cmd + cmd="${1}" + _tmp="/tmp/obarun-install-tmp" + + if [[ ! -d $_tmp ]]; then + mkdir -p -m0755 $_tmp || die "Impossible to create $_tmp" + fi if [[ ! -e $_tmp/customize.${cmd} ]]; then "${cmd}" || die "Cannot execute $_" touch $_tmp/customize.${cmd} else - return - fi + return + fi unset _tmp } @@ -46,24 +46,38 @@ custo_once() { create_log_user(){ - out_action "add ${NEWUSER} at log group" - gpasswd -a "$NEWUSER" log + out_action "add ${NEWUSER} at log group" + gpasswd -a "$NEWUSER" log } custo_once create_log_user config_66(){ - - # creation of the live/ to avoid crash - mkdir -p -m1777 /run/66 - out_action "Enable dbus,consolekit,sddm,networkmanager,wpa_supplicant and ntpd on tree root" - 66-enable -v3 dbus ntpd consolekit sddm networkmanager wpa_supplicant - # avoid permissions access issue - chown -R ${NEWUSER}:users /run/66 - out_action "Create tree graphics for ${NEWUSER}, enables and makes it current" - su "${NEWUSER}" -c "66-tree -v3 -Ecn graphics" - out_action "Enable dbus-user and xdg-user-dirs on tree graphics" - su "${NEWUSER}" -c "66-enable -v3 -t graphics dbus-user xdg-user-dirs" - rm -rf /run/66 + + # creation of the live/ to avoid crash + mkdir -p -m1777 /run/66 + + out_action "Create and enable tree [system]" + 66-tree -v3 -cE system + + out_action "Enable ntpd sshd on tree [system]" + 66-enable -v3 -t system ntpd sshd + + out_action "Create enable and make default tree [desktop]" + 66-tree -v3 -cEn desktop + + out_action "Enable dbus,networkmanager,wpa_supplicant on tree [desktop]" + 66-enable -v3 -t desktop dbus networkmanager wpa_supplicant + + # avoid permissions access issue + chown -R ${NEWUSER}:users /run/66 + + out_action "Create tree graphics for ${NEWUSER}, enables and makes it current" + su "${NEWUSER}" -c "66-tree -v3 -Ecn graphics" + + out_action "Enable dbus-user and xdg-user-dirs on tree graphics" + su "${NEWUSER}" -c "66-enable -v3 -t graphics dbus-user xdg-user-dirs" + + rm -rf /run/66 } custo_once config_66 -- GitLab