From fb9b1ba946e226fdec924ab368cdea2e278dbb23 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 17 Sep 2022 23:36:25 +0200 Subject: {bin/debian-edu-fai_install,fai/config/class/DEBIAN.var.in}: Propagate mirrorurl from debian-edu-fai.conf into FAI config space. --- bin/debian-edu-fai_install | 1 + fai/config/class/DEBIAN.var | 18 ------------------ fai/config/class/DEBIAN.var.in | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 fai/config/class/DEBIAN.var create mode 100644 fai/config/class/DEBIAN.var.in diff --git a/bin/debian-edu-fai_install b/bin/debian-edu-fai_install index fce3bf8..c34264a 100755 --- a/bin/debian-edu-fai_install +++ b/bin/debian-edu-fai_install @@ -248,6 +248,7 @@ for codename in ${codenames}; do [ "$fai_logserver" ] && export fai_logserver && perl -p -e "s/^(#|)LOGSERVER=.{0,1}\@fai_logserver\@.{0,1}\s*\$/LOGSERVER=\'\$ENV{fai_logserver}\'\n/g" "${file_to_adapt%.in}" > "${file_to_adapt%.in}.new" && mv "${file_to_adapt%.in}.new" "${file_to_adapt%.in}" [ "$fai_loguser" ] && export fai_loguser && perl -p -e "s/^(#|)LOGUSER=.{0,1}\@fai_loguser\@.{0,1}\s*\$/LOGUSER=\'\$ENV{fai_loguser}\'\n/g" "${file_to_adapt%.in}" > "${file_to_adapt%.in}.new" && mv "${file_to_adapt%.in}.new" "${file_to_adapt%.in}" [ "$school_tag" ] && export school_tag && perl -p -e "s/\@school_tag\@/\$ENV{school_tag}/g" "${file_to_adapt%.in}" > "${file_to_adapt%.in}.new" && mv "${file_to_adapt%.in}.new" "${file_to_adapt%.in}" + [ "$mirrorurl" ] && export mirrorurl && perl -p -e "s/\@mirrorurl\@/\$ENV{mirrorurl}/g" "${file_to_adapt%.in}" > "${file_to_adapt%.in}.new" && mv "${file_to_adapt%.in}.new" "${file_to_adapt%.in}" chown root:root ${file_to_adapt} chmod 0600 ${file_to_adapt} diff --git a/fai/config/class/DEBIAN.var b/fai/config/class/DEBIAN.var deleted file mode 100644 index 28c3402..0000000 --- a/fai/config/class/DEBIAN.var +++ /dev/null @@ -1,18 +0,0 @@ -apt_cdn=http://deb.debian.org -security_cdn=http://security.debian.org - -CONSOLEFONT= -KEYMAP=us-latin1 - -# MODULESLIST contains modules that will be loaded by the new system, -# not during installation these modules will be written to /etc/modules -# If you need a module during installation, add it to $kernelmodules -# in 20-hwdetect.sh. -MODULESLIST="usbhid psmouse" - -# if you have enough RAM (>2GB) you may want to enable this line. It -# also puts /var/cache into a ramdisk. -#FAI_RAMDISKS="$target/var/lib/dpkg $target/var/cache" - -# if you want to use the faiserver as APT proxy -#APTPROXY=http://faiserver:8000 diff --git a/fai/config/class/DEBIAN.var.in b/fai/config/class/DEBIAN.var.in new file mode 100644 index 0000000..7c5bb76 --- /dev/null +++ b/fai/config/class/DEBIAN.var.in @@ -0,0 +1,18 @@ +apt_cdn=$(echo '@mirrorurl@' | sed -E -e 's@(.*://[^/])(/.*)@\1@g') +security_cdn=http://security.debian.org + +CONSOLEFONT= +KEYMAP=us-latin1 + +# MODULESLIST contains modules that will be loaded by the new system, +# not during installation these modules will be written to /etc/modules +# If you need a module during installation, add it to $kernelmodules +# in 20-hwdetect.sh. +MODULESLIST="usbhid psmouse" + +# if you have enough RAM (>2GB) you may want to enable this line. It +# also puts /var/cache into a ramdisk. +#FAI_RAMDISKS="$target/var/lib/dpkg $target/var/cache" + +# if you want to use the faiserver as APT proxy +#APTPROXY=http://faiserver:8000 -- cgit v1.2.3