patch_bashrc() { echo "#" echo "# As one of the last things here we will set a new prompt to distinguish" echo "# the bwLehrpool satellite server from other servers. To accomplish this" echo "# we will set a very classy prompt. This will take effect at next root login." for f in /root/ /home/*/; do [ -d "$f" ] || continue # Not dir f="$f/.bashrc" [ -f "$f" ] || cp /etc/skel/.bashrc "$f" # Make sure default exists grep -qF '/opt/openslx/bashrc.inc' "$f" && continue # Already patched # This include will set our two-line prompt including the IP address echo ". /opt/openslx/bashrc.inc" >> "$f" # enable aliases, dircolors sed -i -r 's/^(\s*)#\s*(alias|export LS|export GCC|eval )/\1\2/' "$f" done } patch_ldapsearch() { # Make ldapsearch ignore invalid certificates sed -i '/tls_reqcert/Id' /etc/ldap/ldap.conf echo "TLS_REQCERT never" >> /etc/ldap/ldap.conf } patch_java() { # Fix svg renderer: # java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*/accessibility.properties &> /dev/null }