summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
authorChristian Rößler2017-07-31 19:04:50 +0200
committerChristian Rößler2017-07-31 19:04:50 +0200
commitd7b4527c491401cd5a6b0fb65fed60cd1b064a51 (patch)
treec13833f8afdc83f096b22e5750445babc67d86d4 /satellit_installer
parent[SSUS] Confirm update; patch post_max_size; delete dummy coursebackend (diff)
downloadsetup-scripts-d7b4527c491401cd5a6b0fb65fed60cd1b064a51.tar.gz
setup-scripts-d7b4527c491401cd5a6b0fb65fed60cd1b064a51.tar.xz
setup-scripts-d7b4527c491401cd5a6b0fb65fed60cd1b064a51.zip
[SSPS] For Debian 9, ipxe patch changed etc.
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/includes/00-variables.inc6
-rw-r--r--satellit_installer/includes/10-configurations.inc9
-rw-r--r--satellit_installer/includes/10-install_ipxe.inc2
-rw-r--r--satellit_installer/static_files/ipxe.patch7
-rw-r--r--satellit_installer/static_files/rclocal_script.sh22
5 files changed, 34 insertions, 12 deletions
diff --git a/satellit_installer/includes/00-variables.inc b/satellit_installer/includes/00-variables.inc
index 7701106..c0f4546 100644
--- a/satellit_installer/includes/00-variables.inc
+++ b/satellit_installer/includes/00-variables.inc
@@ -22,15 +22,15 @@ PACKAGELIST_SCRIPT="cracklib-runtime wget"
# lithe and lean. So, if you add a package here make sure it installs using these options.
# If this is not the case or in doubt use PACKAGELIST_WITH_RECOMMENDS below.
PACKAGELIST_SERVER="
- mysql-server lighttpd atftpd php5-cgi php5-curl cifs-utils
- sudo php5-common php5-mysqlnd php5-cli nfs-kernel-server curl
+ mysql-server lighttpd atftpd php-cgi php-curl cifs-utils php-mbstring
+ sudo php-common php-mysqlnd php-cli nfs-kernel-server curl
nfs-common libowfat0 ldap-utils vim gcc make unattended-upgrades gnupg
libowfat-dev libssl-dev gcc make liblzma-dev tmate
"
# Enter here packages needing installation of recommended packages as determines by apt-get:
PACKAGELIST_WITH_RECOMMENDS="
- openjdk-7-jre-headless open-vm-tools
+ openjdk-8-jre-headless open-vm-tools
"
# (java simply fails otherwise, open-vm-tools needs recommended packages for its kernel modules)
diff --git a/satellit_installer/includes/10-configurations.inc b/satellit_installer/includes/10-configurations.inc
index 45af103..f9072e0 100644
--- a/satellit_installer/includes/10-configurations.inc
+++ b/satellit_installer/includes/10-configurations.inc
@@ -67,7 +67,7 @@ patch_lighttpd_config() {
patch_php_config() {
echo -n "# Patching php configuration... "
- local PHPINIFILE=/etc/php5/cgi/php.ini
+ local PHPINIFILE=/etc/php/7.0/cgi/php.ini
if [ -f "$PHPINIFILE" ]; then
grep -E "^\s*upload_max_filesize" "$PHPINIFILE" # 2>/dev/null 1>&2
@@ -79,6 +79,13 @@ patch_php_config() {
echo -n "no upload_max_filesize entry found; appending 100M entry... "
echo "upload_max_filesize = 100M" >> "$PHPINIFILE"
fi
+
+ if grep -q -E '^\s*post_max_size' "$PHPINIFILE"; then
+ sed -i -e '/^\s*post_max_size/c\post_max_size = 100M' "$PHPINIFILE" || pwarning "Could not increase PHP upload limit"
+ else
+ echo "post_max_size = 100M" >> "$PHPINIFILE" || pwarning "Could not increase PHP upload limit"
+ fi
+
echo "ok."
service lighttpd reload
else
diff --git a/satellit_installer/includes/10-install_ipxe.inc b/satellit_installer/includes/10-install_ipxe.inc
index 1fb14d3..cbbd509 100644
--- a/satellit_installer/includes/10-install_ipxe.inc
+++ b/satellit_installer/includes/10-install_ipxe.inc
@@ -5,7 +5,7 @@ install_ipxe() {
# git clone --depth 1 git://git.ipxe.org/ipxe.git "$1" || perror "Cloning ipxe repo failed"
git clone git://git.ipxe.org/ipxe.git "$1" || perror "Cloning ipxe repo failed"
cd "$1"
- git reset --hard 6a3ffa0114411ae4aa6c4485c6058bf03fec3623
+ git reset --hard 936657832f2262ad04bdf16b9229ce0b1d1c174f
git apply --ignore-whitespace < "${BASEDIR}/static_files/ipxe.patch" || perror "Could not patch ipxe compile-time configuration"
cd - > /dev/null
wget -O "$1/pxelinux.0" "$HTTP_BASE/pxelinux.0" || perror "Could not download pxelinux 4 from $HTTP_BASE"
diff --git a/satellit_installer/static_files/ipxe.patch b/satellit_installer/static_files/ipxe.patch
index 87ff25a..56c01ae 100644
--- a/satellit_installer/static_files/ipxe.patch
+++ b/satellit_installer/static_files/ipxe.patch
@@ -28,7 +28,7 @@ diff --git a/src/config/general.h b/src/config/general.h
index ee15f6b..da39a1a 100644
--- a/src/config/general.h
+++ b/src/config/general.h
-@@ -63,11 +63,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+@@ -65,11 +65,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*
*/
@@ -58,13 +58,14 @@ index ee15f6b..da39a1a 100644
/*
* Name resolution modules
-@@ -119,15 +119,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+@@ -124,16 +124,16 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define NVO_CMD /* Non-volatile option storage commands */
#define CONFIG_CMD /* Option configuration console */
#define IFMGMT_CMD /* Interface management commands */
-#define IWMGMT_CMD /* Wireless interface management commands */
--#define FCMGMT_CMD /* Fibre Channel management commands */
+#undef IWMGMT_CMD /* Wireless interface management commands */
+ #define IBMGMT_CMD /* Infiniband management commands */
+-#define FCMGMT_CMD /* Fibre Channel management commands */
+#undef FCMGMT_CMD /* Fibre Channel management commands */
#define ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
diff --git a/satellit_installer/static_files/rclocal_script.sh b/satellit_installer/static_files/rclocal_script.sh
index bfb11a6..381b56a 100644
--- a/satellit_installer/static_files/rclocal_script.sh
+++ b/satellit_installer/static_files/rclocal_script.sh
@@ -4,6 +4,18 @@ MY_PID=$$
perror() {
echo "$@" >> /root/init.log
[ "$MY_PID" != "$$" ] && kill "$MY_PID"
+
+ if ! grep -q "rclocal_script.sh has thrown an error" /etc/motd; then
+ cat <<-EOF >> /etc/motd
+
+ WARNING!
+
+ rclocal_script.sh has thrown an error!
+ Please read /root/init.log and take appropriate measures!
+ This server may not work correctly!
+
+ EOF
+ fi
exit 5
}
@@ -57,8 +69,13 @@ echo "SET PASSWORD FOR 'sat'@'localhost' = PASSWORD('$MYSQL_SAT_NEW');" | mysql
MYSQL_OPENSLX_NEW=$(generate_password)
echo "SET PASSWORD FOR 'openslx'@'localhost' = PASSWORD('$MYSQL_OPENSLX_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des openslx-MySQL-Passworts fehlgeschlagen."
+# Debian 9 (stretch) does not seem to have a debian-sys-maint user anymore.
MYSQL_SYSMAINT_NEW=$(generate_password)
-echo "SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('$MYSQL_SYSMAINT_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des debian-sys-maint-Passworts fehlgeschlagen."
+if grep -q debian-sys-maint /etc/mysql/debian.cnf; then
+ echo "SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('$MYSQL_SYSMAINT_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des debian-sys-maint-Passworts fehlgeschlagen."
+ # Patching debian-sys-maint password into /etc/mysql/debian.cnf:
+ patchfiles 'password *=.*$' "password = $MYSQL_SYSMAINT_NEW" "/etc/mysql/debian.cnf"
+fi
# Store mysql root pass in root's home
echo "$MYSQL_ROOT_NEW" > /root/mysqlpass
@@ -74,9 +91,6 @@ patchfiles "%MYSQL_SAT_PASS%" "$MYSQL_SAT_NEW" "$DMSDDIR
# Patching openslx-mysql-userpass into slx-admin config:
patchfiles "%MYSQL_OPENSLX_PASS%" "$MYSQL_OPENSLX_NEW" "$WWWDIR/slx-admin/config.php"
-# Patching debian-sys-maint password into /etc/mysql/debian.cnf:
-patchfiles 'password *=.*$' "password = $MYSQL_SYSMAINT_NEW" "/etc/mysql/debian.cnf"
-
echo " ok." >> /root/init.log
echo "Dienste werden aktiviert..." >> /root/init.log