From 747b20d4445f04caf7664cc88e8aff505643d92b Mon Sep 17 00:00:00 2001
From: jean-michel <jean-michel@obarun.org>
Date: Thu, 21 Mar 2019 02:49:14 +0100
Subject: [PATCH] adjust services for kde

---
 plasma/customizeChroot | 53 +++++++++++-------------------------------
 1 file changed, 13 insertions(+), 40 deletions(-)

diff --git a/plasma/customizeChroot b/plasma/customizeChroot
index b76338e..2264e70 100755
--- a/plasma/customizeChroot
+++ b/plasma/customizeChroot
@@ -53,48 +53,21 @@ custo_once create_log_user
 
 ##		Configure S6 service
 
-config_s6(){
+config_66(){
 	
-	out_action "Enable syslogds6 service"
-	cp -ra /etc/s6-serv/available/classic/syslogds6 /etc/s6-serv/enabled/classic/
-	out_action "Enable dbus service"
-	cp -ra /etc/s6-serv/available/classic/dbus /etc/s6-serv/enabled/classic/
-	out_action "Enable consolekit service"
-	cp -ra /etc/s6-serv/available/classic/consolekit /etc/s6-serv/enabled/classic/
-	out_action "Enable ntpd service"
-	cp -ra /etc/s6-serv/available/classic/ntpd /etc/s6-serv/enabled/classic/
-		
-	out_action "Create Live database"
-	s6opts add live bundle-Networkmanager
-	s6opts compile Live live	
-	
-	out_action "Make Live as current database"
-	rm /etc/s6-serv/enabled/rc/compiled/current
-	ln -sf /etc/s6-serv/enabled/rc/compiled/Live /etc/s6-serv/enabled/rc/compiled/current
-	
-	out_action "Create directories for user supervision tree"
-	su "${NEWUSER}" -c "s6opts user"
-	out_action "Enable dbus service for ${NEWUSER} user"
-	su "${NEWUSER}" -c "cp -ra /etc/s6-serv/available/user/classic/dbus /home/${NEWUSER}/service/enabled/classic/"
-	out_action "Create ${NEWUSER} log directory for dbus"
-	su "${NEWUSER}" -c "s6opts checklog dbus"
-	
-	out_action "Create User-live database"
-	su "${NEWUSER}" -c "s6opts add user-live xdg-user-dirs-oneshot"
-	su "${NEWUSER}" -c "s6opts compile User-live user-live"
-	
-	out_action "Make User-live as current database"
-	rm /home/"${NEWUSER}"/service/enabled/rc/compiled/current
-	ln -sf /home/"${NEWUSER}"/service/enabled/rc/compiled/User-live /home/"${NEWUSER}"/service/enabled/rc/compiled/current
-}
-custo_once config_s6
-
-##      Configure pulseaudio
-
-config_pulse(){
-	echo "load-module module-device-manager" >> /etc/pulse/default.pa
+	# 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
 }
-custo_once config_pulse
+custo_once config_66
 
 out_valid "Customization terminate"
 
-- 
GitLab