Skip to content
Commits on Source (3)
debian-edu-config (2.10.38) UNRELEASED; urgency=medium
* share/debian-edu-config/tools/run-at-firstboot:
- Remove obsolete LTSP related workaround.
- Drop no longer needed Squid setup related fix.
- Replace nagios3 with icinga.
* sbin/debian-edu-ltsp:
- Remove obsolete workaround.
- Adjust code now that the LTSP chroot arch matches the server arch.
-- Wolfgang Schweer <wschweer@arcor.de> Fri, 28 Sep 2018 22:02:33 +0200
debian-edu-config (2.10.37) unstable; urgency=medium
[ Wolfgang Schweer ]
......
......@@ -8,8 +8,8 @@
base=
dist=
while [ $# -gt 0 ] ; do
case "$1" in
while [ $# -gt 0 ] ; do
case "$1" in
--base) base="$2" ; shift ;;
--dist) dist="$2" ; shift ;;
--arch) arch="$2" ; shift ;;
......@@ -17,7 +17,7 @@ while [ $# -gt 0 ] ; do
shift
done
if [ -z "$base" -a -z "$arch" ] ; then
if [ -z "$base" -a -z "$arch" ] ; then
case $(uname -m) in
ppc) ARCH=powerpc ;;
i*86) ARCH=i386 ;;
......@@ -39,23 +39,27 @@ test "$base" || base=/opt/ltsp
test "$dist" || dist=$(lsb_release -sc)
if [ -d $base/$ARCH ] ; then
echo "error: $base/$ARCH already exist. Remove it before running $0"
echo " If you want to install in parallell with an old installation, "
echo " please use --base <new location> as an option"
echo "error: $base/$ARCH already exists."
echo " Remove the chroot before running $0 again."
echo " To install a chroot for a specific architecture,"
echo " please use --arch <i386|amd64> as an option."
echo " If you want to install in parallell with an old installation,"
echo " use --base <new location> --arch <i386|amd64> as options."
exit 1
fi
# Check if server uses install or cd to install
if apt-cache policy ltsp-client | grep -q "cdrom://" ; then
if apt-cache policy ltsp-client | grep -q "cdrom://" ; then
mirror=file:///media/cdrom
components="main local"
components="main"
securitymirror=""
extramirror=""
else
mirror=http://deb.debian.org/debian
extramirror=""
securitymirror="http://security.debian.org/ $dist/updates main contrib"
components="main contrib"
securitymirror="http://security.debian.org/ $dist/updates main"
components="main"
fi
umounts=
......@@ -82,36 +86,4 @@ case $mirror in
;;
esac
if ltsp-build-client --help 2>&1 |grep -q -- --root ; then
# Old version
ltspopts="--root $base/$ARCH"
else
# new version (at least >= 0.93debian1)
ltspopts="--eatmydata --accept-unsigned-packages --base /opt/ltsp --arch $ARCH"
fi
# Build LTSP chroot, fetch packages from default APT sources
# FIXME: Added ugly workaround to let installation succeed in case the
# dictionaries-common problem occurs.
if ltsp-build-client \
$ltspopts \
--mirror $mirror \
--dist $dist \
--components "$components" \
--security-mirror "$securitymirror" \
--extra-mirror "$extramirror" ; then
:
else
ltsp-chroot /usr/share/debconf/fix_db.pl
ltsp-chroot dpkg --configure -a
fi
#populate /var/lib/tftpboot with kernel images and pxelinux configuration
if [ -f /usr/sbin/ltsp-update-kernels ] ; then
ltsp-update-kernels
fi
# And update ssh keys
if [ -x /usr/sbin/ltsp-update-sshkeys ]; then
ltsp-update-sshkeys
fi
ltsp-build-client --eatmydata --accept-unsigned-packages --base $base --arch $ARCH --dist $dist
......@@ -18,18 +18,6 @@ trap at_exit INT TERM EXIT
info "Executing run-at-firstboot script."
# fix for skolelinux bug #1355:
# make sure /opt/ltsp/*/etc/ssh/ssh_known_hosts is created
if [ -x /usr/sbin/ltsp-update-sshkeys ]; then
ltsp-update-sshkeys
fi
# Make sure the LTSP kernels are updated too, in case the initrd was
# upgraded during installation (for example for removing usplash)
if [ -x /usr/sbin/ltsp-update-kernels ]; then
ltsp-update-kernels
fi
# Make sure resolv.conf in LTSP chroot are updated also on the main
# server where the DNS resolver do not change that often.
if [ -x /usr/share/debian-edu-config/tools/ltsp-update-resolvconf ] ; then
......@@ -58,20 +46,17 @@ if [ -x /usr/sbin/sitesummary-client ] ; then
su munin -s /usr/bin/munin-cron
fi
# Nagios need a restart to find the new configuration
if [ -x /etc/init.d/nagios3 ] ; then
info "restarting nagios3 service"
service nagios3 restart
# Icinga needs a restart to find the new configuration
if [ -x /etc/init.d/icinga ] ; then
info "restarting icinga service"
service icinga restart
fi
fi
fi
# Fix squid setup after first boot (cf.squid seems to do it only randomly).
if echo "$PROFILE" | grep -q Main-Server && \
! [ -d /var/spool/squid/00 ] ; then
/usr/sbin/dpkg-reconfigure squid
# Update Squid to use all the available space (aka 80% of the partition)
/usr/share/debian-edu-config/tools/squid-update-cachedir /etc/squid/squid-debian-edu.conf
if echo "$PROFILE" | grep -q Main-Server ; then
/usr/share/debian-edu-config/tools/squid-update-cachedir /etc/squid/squid.conf
fi
# Update PXE setup on Main-server with proxy values set in environment
......@@ -87,7 +72,7 @@ if echo "$PROFILE" | grep -q Main-Server && \
# Try to set from wpad file, as this normally is called from
# dhcp, and the main-server have static IP setup.
if [ -z "$http_proxy" ] ; then
if ! echo "$http_proxy" | grep -q webcache ; then
/usr/share/debian-edu-config/tools/update-proxy-from-wpad
. /etc/environment
export http_proxy ftp_proxy
......