[debian-edu-commits] debian-edu/ 04/14: Adjust d-i/finish-install and 032-edu-pkgs (ltsp) to work with Cfengine3.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sat Jan 6 23:46:41 UTC 2018


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository debian-edu-config.

commit 3872588b0e435335bd9d801146da8f3731fdc623
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sat Jan 6 23:35:53 2018 +0100

    Adjust d-i/finish-install and 032-edu-pkgs (ltsp) to work with Cfengine3.
---
 share/debian-edu-config/d-i/finish-install           | 20 +++++++++++++-------
 .../ltsp-build-client/Debian-custom/032-edu-pkgs     |  5 +++--
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/share/debian-edu-config/d-i/finish-install b/share/debian-edu-config/d-i/finish-install
index ea8d945..d87ac77 100644
--- a/share/debian-edu-config/d-i/finish-install
+++ b/share/debian-edu-config/d-i/finish-install
@@ -2,7 +2,7 @@
 #
 # This script is executed within the debian-installer environment when
 # finish-install.d is executed, which is executed at the end of the
-# installation after the cfengine-debian-edu script has executed
+# installation. It includes running cf-agent for final configuration.
 
 set -e
 
@@ -33,7 +33,7 @@ preserve_network_interfaces() {
 db_get debian-edu-install/profile
 PROFILE="$RET"
 
-# Register changes before and after cfengine is executed, to make it
+# Register changes before and after cf-agent is executed, to make it
 # easier to track our changes
 edu-etcvcs commit
 
@@ -66,11 +66,18 @@ epid=$!
 # debconf-get-selections --installer work.
 . /usr/lib/finish-install.d/94save-logs
 
-# Update configuration for everything that could not be preseeded
-if in-target cfengine-debian-edu -D installation ; then
+# Setup Cfengine3 environment.
+if in-target /usr/share/debian-edu-config/tools/setup-cfengine3 ; then
+    log "info: Running 'setup-cfengine3' succeeded"
+else
+    log "error: '/usr/share/debian-edu-config/tools/setup-cfengine3' is missing"
+fi
+
+# Update configuration via cf-agent for everything that could not be preseeded.
+if in-target /bin/sh -c "cf-agent -I 2>&1 > /var/log/installer/cfengine-edu-install.log" ; then
     :
 else
-    log "error: Running 'cfengine-debian-edu -D installation' returned an error"
+    log "error: Running 'cf-agent -I' failed to work at some point"
 fi
 
 edu-etcvcs commit
@@ -96,7 +103,7 @@ fi
 
 # Make sure the root password is gone from debconf after the
 # installation, in case ldap-debian-edu-install and kerberos-init-kdc 
-# scripts failed when cfengine was executed.
+# scripts failed when cf-agent was executed.
 # Ignore errors as these templates do not exist on standalone installs
 db_set debian-edu-config/ldap-password '' || true
 db_set debian-edu-config/ldap-password-again '' || true
@@ -119,4 +126,3 @@ if LANG=C chroot /target fuser -mv $mountpoints 2>&1 | egrep -qv 'USER|mount |Ca
     log "error: some processes blocking d-i from umounting /target/"
 fi
 
-
diff --git a/share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs b/share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs
index f9d0447..69a7c25 100644
--- a/share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs
+++ b/share/ltsp/plugins/ltsp-build-client/Debian-custom/032-edu-pkgs
@@ -361,8 +361,9 @@ BASE $ldapbase
 EOF
     fi
 
-    # Make the ldap users availible in the chroot
-    in_target cfengine-debian-edu -Dinstallation
+    # Setup Cfengine3 and apply configuration inside the LTSP chroot.
+    in_target /usr/share/debian-edu-config/tools/setup-cfengine3
+    in_target /bin/sh -c "cf-agent -D installation 2>&1 | tee /var/log/cfengine3/edu-ltsp-install.log"
 
     etcvcs_commit "After cfengine is executed"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list