Index: src/build/CD/pkglist.txt
===================================================================
--- src/build/CD/pkglist.txt	(revision 5229)
+++ src/build/CD/pkglist.txt	(working copy)
@@ -36,8 +36,8 @@
 cdebootstrap-udeb
 celestia-common
 celestia
-cfengine-doc
-cfengine
+cfengine2-doc
+cfengine2
 console-common
 console-data
 console-tools
Index: src/build/CD/combined-laptop-server_lessdisks-ws
===================================================================
--- src/build/CD/combined-laptop-server_lessdisks-ws	(revision 5229)
+++ src/build/CD/combined-laptop-server_lessdisks-ws	(working copy)
@@ -29,8 +29,8 @@
 bsdmainutils
 bsdutils
 bzip2
-cfengine
-cfengine-doc
+cfengine2
+cfengine2-doc
 console-common
 console-data
 console-tools
Index: src/build/CD/hintpkgs.txt
===================================================================
--- src/build/CD/hintpkgs.txt	(revision 5229)
+++ src/build/CD/hintpkgs.txt	(working copy)
@@ -13,8 +13,6 @@
 exim4-config
 # only one inetd
 netkit-inetd
-# cfengine2 has a bug that causes the ltsp profile not to be installed
-cfengine
 initrd-netboot-tools
 udhcpc
 kernel-image-netbootable
Index: src/build/CD/sourcelist.txt
===================================================================
--- src/build/CD/sourcelist.txt	(revision 5229)
+++ src/build/CD/sourcelist.txt	(working copy)
@@ -29,7 +29,7 @@
 bsdmainutils
 bzip2
 celestia
-cfengine
+cfengine2
 clearlooks
 console-common
 console-data
Index: src/build/CD/wantedpkglist.txt
===================================================================
--- src/build/CD/wantedpkglist.txt	(revision 5229)
+++ src/build/CD/wantedpkglist.txt	(working copy)
@@ -2,7 +2,7 @@
 exim4-daemon-heavy
 exim4-config
 netkit-inetd
-cfengine
+cfengine2
 initrd-netboot-tools
 udhcpc
 kernel-image-netbootable
@@ -18,7 +18,7 @@
 education-common
 sysutils
 ssh
-cfengine-doc
+cfengine2-doc
 vim
 nullidentd
 lvm2
Index: src/debian-edu-config/debian/control
===================================================================
--- src/debian-edu-config/debian/control	(revision 5229)
+++ src/debian-edu-config/debian/control	(working copy)
@@ -8,7 +8,7 @@
 
 Package: debian-edu-config
 Architecture: all
-Depends: cfengine2 | cfengine, libconfig-inifiles-perl, iptables, mime-support
+Depends: cfengine2, libconfig-inifiles-perl, iptables, mime-support
 Recommends: slapd, openssl
 Replaces: ldap-skolelinux, cfengine-skolelinux, ncs
 Provides: cfengine-skolelinux, ncs
Index: src/debian-edu-config/cf/cf.cfengine
===================================================================
--- src/debian-edu-config/cf/cf.cfengine	(revision 0)
+++ src/debian-edu-config/cf/cf.cfengine	(revision 0)
@@ -0,0 +1,24 @@
+groups:
+	cfclient		= ( "/bin/ping -c 1 cfservd" )
+
+editfiles:
+	cfclient::
+		# Activate cfservd if there is a cfengine server on the net
+		{ /etc/default/cfengine2
+
+		BeginGroupIfNoMatch "RUN_CFSERVD=1"
+			LocateLineMatching "RUN_CFSERVD=0"
+			ReplaceLineWith "RUN_CFSERVD=1"
+		EndGroup
+		}
+	
+		# Run cfengine on reboot
+		# (to make sure that clients that are offline a lot, get their "fix", too
+		{ /etc/cron.d/cfengine
+		AutoCreate
+		AppendIfNoSuchLine "@reboot    cfagent -f update.conf && cfagent -f cfagent.conf"
+		}
+
+shellcommands:
+	cfclient::
+		/etc/init.d/cfengine restart
Index: src/debian-edu-config/cf/cfengine.conf
===================================================================
--- src/debian-edu-config/cf/cfengine.conf	(revision 5229)
+++ src/debian-edu-config/cf/cfengine.conf	(working copy)
@@ -126,6 +126,9 @@
 			cf.nat
 			cf.webmin
 			cf.sysstat
+	
+	debian.workstation.installation::
+			cf.cfengine
 
 	debian.installation.!standalone::
 			cf.homes
Index: src/debian-edu-config/etc/cfengine/cfservd.conf
===================================================================
--- src/debian-edu-config/etc/cfengine/cfservd.conf	(revision 0)
+++ src/debian-edu-config/etc/cfengine/cfservd.conf	(revision 0)
@@ -0,0 +1,21 @@
+control:
+	server = ( "10.0.2.2" )
+	base = ( "/etc/cfengine" )
+
+	cfrunCommand = ( "/usr/sbin/cfagent" )
+	MaxConnections = ( 15 )
+	MultipleConnections = ( true )
+	IfElapsed = ( 60 )
+	DenyBadClocks = ( false )
+	AllowUsers = ( root )
+	TrustKeysFrom = ( $(server) )
+
+grant:
+	# The cfrunCommand must be shared in order for the
+	# server to execute it.
+	$(cfrunCommand)		$(server)
+
+	# This directory should be shared on the server so that
+	# clients can download scripts. So if this is the server,
+	# uncomment the following line.
+	# $(base)/input		*.intern
Index: src/debian-edu-config/etc/cfengine/inputs/cfagent.conf
===================================================================
--- src/debian-edu-config/etc/cfengine/inputs/cfagent.conf	(revision 0)
+++ src/debian-edu-config/etc/cfengine/inputs/cfagent.conf	(revision 0)
@@ -0,0 +1,18 @@
+#
+# The whole inputs/ directory gets copied to clients. This cfagent.conf
+# is then executed.
+#
+
+control:
+	access			= ( root )
+	sysadm			= ( root )
+	adminfiles		= ( /etc/cfengine )
+
+	actionsequence = (
+		links
+	)
+
+
+# Just a simple little check for a default setup
+links:
+	/dev/core	->	/proc/kcore
Index: src/debian-edu-config/etc/cfengine/update.conf
===================================================================
--- src/debian-edu-config/etc/cfengine/update.conf	(revision 0)
+++ src/debian-edu-config/etc/cfengine/update.conf	(revision 0)
@@ -0,0 +1,34 @@
+###############################################################################
+#
+# update.conf - ensure that the inputs and binaries in /etc/cfengine are
+# synced to those on the server.
+# 
+# This copies the cfagent.conf and inputs directory from the cfengine
+# server.
+#
+###############################################################################
+
+control:
+	actionsequence = ( copy links )
+	DefaultCopyType = ( checksum )
+
+	cfhost = ( cfengine )
+	localdir = ( /etc/cfengine )
+	serverdir = ( /etc/cfengine )
+	mode = ( 700 )
+	fowner = ( root )
+	fgroup = ( root )
+
+copy:
+	$(serverdir)/inputs
+		dest=$(localdir)/inputs
+		recurse=inf
+		owner=$(fowner) group=$(fgroup)
+		mode=$(mode)
+		exclude=*~
+		exclude=#*
+		server=$(cfhost)
+		trustkey=true
+
+links:
+	$localdir/cfagent.conf ->! $(localdir)/inputs/cfagent.conf
Index: src/debian-edu-config/Makefile
===================================================================
--- src/debian-edu-config/Makefile	(revision 5229)
+++ src/debian-edu-config/Makefile	(working copy)
@@ -31,6 +31,7 @@
 	cf.apt \
 	cf.bind8 \
 	cf.bind9 \
+	cf.cfengine \
 	cf.cups \
 	cf.devfsd \
 	cf.dhcpserver \
@@ -77,6 +78,9 @@
 	bind/debian-edu/db.intern \
 	bind/debian-edu/named-bind8.conf \
 	bind/debian-edu/named-bind9.conf \
+	cfengine/cfservd.conf \
+	cfengine/update.conf \
+	cfengine/inputs/cfagent.conf \
 	courier/authldaprc-debian-edu \
 	courier/imapd-debian-edu.cnf \
 	debian-edu/hd-warn.conf \
Index: src/debian-edu/debian/control
===================================================================
--- src/debian-edu/debian/control	(revision 5229)
+++ src/debian-edu/debian/control	(working copy)
@@ -33,7 +33,7 @@
 Package: education-common
 Architecture: any
 Depends: education-tasks
-Recommends: apt-listchanges, arping, bc, cfengine, cfengine-doc, debconf-utils, debian-edu-config, debian-edu-install, dmidecode, eject, etherwake, ethtool, ext2resize, finger, gawk, hdparm, host, hwdata, hwinfo, iproute, isag, kudzu, less, libwww-perl, localization-config, lvm2, man-db, manpages, modconf, mtools, ncftp, ng-utils, nictools-nopci, nictools-pci, nmap, nscd, nullidentd, procmail, raidutils, read-edid, recover, reportbug, rsync, smartmontools, ssh, strace, sudo, sysutils, tcpdump, tcptraceroute, traceroute, udev, vim, wget, xdebconfigurator
+Recommends: apt-listchanges, arping, bc, cfengine2, cfengine2-doc, debconf-utils, debian-edu-config, debian-edu-install, dmidecode, eject, etherwake, ethtool, ext2resize, finger, gawk, hdparm, host, hwdata, hwinfo, iproute, isag, kudzu, less, libwww-perl, localization-config, lvm2, man-db, manpages, modconf, mtools, ncftp, ng-utils, nictools-nopci, nictools-pci, nmap, nscd, nullidentd, procmail, raidutils, read-edid, recover, reportbug, rsync, smartmontools, ssh, strace, sudo, sysutils, tcpdump, tcptraceroute, traceroute, udev, vim, wget, xdebconfigurator
 Suggests: chkconfig, debian-edu-doc, dpt-raidutil, emacs21, grub, grub-doc, ident-server, locale-config-skolelinux, mdetect, resolvconfRecommends:  cron-apt, smartsuite
 Description: DebianEdu common packages
  A metapackage containing dependencies for packages required on all
Index: src/debian-edu/tasks/common
===================================================================
--- src/debian-edu/tasks/common	(revision 5229)
+++ src/debian-edu/tasks/common	(working copy)
@@ -15,8 +15,8 @@
 Responsible: ?
 NeedConfig:  yes - enable X login etc
 
-#Depends:     cfengine2, cfengine2-doc
-Depends:     cfengine, cfengine-doc
+Depends:     cfengine2, cfengine2-doc
+#Depends:     cfengine, cfengine-doc
 Why:         Allow central administration and configuration
 Responsible: ?
 NeedConfig:  yes
Index: src/debian-edu/Makefile
===================================================================
--- src/debian-edu/Makefile	(revision 5229)
+++ src/debian-edu/Makefile	(working copy)
@@ -27,5 +27,5 @@
 clean: 
 	rm -rf tmp
 	rm -f tasks/*~a
-	rm -rf tasksel
+	rm -rf tasksel debian-edu-tasks.desc
 	rm -f packages.txt by_vote packages-sorted.txt
Index: src/debian-edu/sources.list.sarge
===================================================================
--- src/debian-edu/sources.list.sarge	(revision 5229)
+++ src/debian-edu/sources.list.sarge	(working copy)
@@ -1,4 +1,4 @@
-deb ftp://ftp.debian.org/debian/ sarge main contrib non-free
-deb ftp://non-us.debian.org/debian-non-US/ sarge/non-US main contrib non-free
+deb http://ftp.debian.org/debian/ sarge main contrib non-free
+deb http://non-us.debian.org/debian-non-US/ sarge/non-US main contrib non-free
 deb http://ftp.skolelinux.no/skolelinux/ sarge local
 #deb http://people.linuxlabs.no/ragnar ltsp-debs/
