pulled common upgrade parts for Mint and Ubuntu out to make install scripts not duplicate content
This commit is contained in:
6
upgrade-script-common/delete-pkgs
Executable file
6
upgrade-script-common/delete-pkgs
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-get -y purge modemmanager
|
||||
apt-get -y purge avahi-daemon
|
||||
apt-get -y purge speech-dispatcher
|
||||
apt-get -y autoremove
|
||||
6
upgrade-script-common/fix-fstab
Executable file
6
upgrade-script-common/fix-fstab
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
OD=$1
|
||||
# FIX /etc/fstab (likely this would work) -- relies on you already having installed with /home AND UUID/mount options not changing
|
||||
grep '/export' $OD/etc/fstab >> /etc/fstab
|
||||
grep '/backup' $OD/etc/fstab >> /etc/fstab
|
||||
33
upgrade-script-common/ldap-conf
Executable file
33
upgrade-script-common/ldap-conf
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set up defaults for using ldap (pre-answering ldap-auth-config)
|
||||
echo "ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://192.168.2.2" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/ldapns/base-dn string dc=depaoli,dc=id,dc=au" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/ldapns/ldap_version select 3" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/dbrootlogin boolean true" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/dblogin boolean false" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/ldapns/base-dn string dc=depaoli,dc=id,dc=au" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/rootbinddn string cn=admin,dc=depaoli,dc=id,dc=au" | debconf-set-selections
|
||||
echo "ldap-auth-config ldap-auth-config/rootbindpw string a_real_admin_pass_word_for_2o20" | debconf-set-selections
|
||||
|
||||
sudo apt install libnss-ldap libpam-ldap ldap-utils nscd
|
||||
|
||||
# make system use ldap for users / groups
|
||||
sed -i -e s"/passwd: files/passwd: files systemd ldap/" /etc/nsswitch.conf
|
||||
sed -i -e s"/group: files/group: files systemd ldap/" /etc/nsswitch.conf
|
||||
|
||||
# test this
|
||||
echo 'pam-auth-update pam-auth-update/enable_mkhomedir boolean true' | sudo debconf-set-selections
|
||||
sudo DEBIAN_FRONTEND=noninteractive pam-auth-update ; # tick on home dir creation
|
||||
|
||||
# add bind_policy soft to /etc/ldap.conf (as root)
|
||||
echo "bind_policy soft" >> /etc/ldap.conf
|
||||
|
||||
# OLD WAY: answer:
|
||||
#1) ldap://192.168.2.2
|
||||
#2) dc=depaoli,dc=id,dc=au
|
||||
#3) 3
|
||||
#4) Yes
|
||||
#5) No
|
||||
#6) cn=admin,dc=depaoli,dc=id,dc=au
|
||||
#7) a_real_admin_pass_word_for_2o20
|
||||
5
upgrade-script-common/wol
Executable file
5
upgrade-script-common/wol
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ensure wol works in new systemd world
|
||||
conn=`nmcli -t -f NAME,TYPE connection show | grep ethernet | cut -f1 -d:`
|
||||
sudo nmcli c modify "$conn" 802-3-ethernet.wake-on-lan magic
|
||||
Reference in New Issue
Block a user