summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-30 14:26:10 +0200
committerSimon Rettberg2024-04-30 14:26:10 +0200
commit6512e211c44832fae7d04684ac1820c0c28c8d0a (patch)
tree05b8665da19275e79183018725ca4e558312c5d8
parent[SS*S] lighttpd: Don't try to use ssl.ca-file for certificate chain (diff)
downloadsetup-scripts-6512e211c44832fae7d04684ac1820c0c28c8d0a.tar.gz
setup-scripts-6512e211c44832fae7d04684ac1820c0c28c8d0a.tar.xz
setup-scripts-6512e211c44832fae7d04684ac1820c0c28c8d0a.zip
[SS?S] Split static_files/system into base and updates
base is considered static, i.e. only copied once when *installing* a server, because they are config files the user/admin is expected to edit, or because they have to match the specific Debian release the installed server is based on, and thus should not - or only selectively - be replaced by the satellite updater. In other words, the system-updates module should be save to be copied over a running satellite server on update via "install_files", while files from system-base will only be updated selectively, if at all.
-rw-r--r--satellit_installer/includes/50-copyscripts.inc3
-rw-r--r--satellit_installer/static_files/system-base/etc/apt/apt.conf.d/99update-config (renamed from satellit_installer/static_files/system/etc/apt/apt.conf.d/99update-config)0
-rw-r--r--satellit_installer/static_files/system-base/etc/issue (renamed from satellit_installer/static_files/system/etc/issue)0
-rw-r--r--satellit_installer/static_files/system-base/etc/issue.disabled (renamed from satellit_installer/static_files/system/etc/issue.disabled)0
-rw-r--r--satellit_installer/static_files/system-base/etc/mysql/conf.d/99-openslx.cnf (renamed from satellit_installer/static_files/system/etc/mysql/conf.d/99-openslx.cnf)0
-rw-r--r--satellit_installer/static_files/system-base/etc/systemd/system/firstboot.service (renamed from satellit_installer/static_files/system/etc/systemd/system/firstboot.service)0
-rw-r--r--satellit_installer/static_files/system-base/etc/tmux.conf (renamed from satellit_installer/static_files/system/etc/tmux.conf)0
-rw-r--r--satellit_installer/static_files/system-base/etc/vim/vimrc.local (renamed from satellit_installer/static_files/system/etc/vim/vimrc.local)0
-rw-r--r--satellit_installer/static_files/system-base/opt/openslx/bashrc.inc (renamed from satellit_installer/static_files/system/opt/openslx/bashrc.inc)0
-rwxr-xr-xsatellit_installer/static_files/system-base/opt/openslx/firstboot.sh (renamed from satellit_installer/static_files/system/opt/openslx/firstboot.sh)0
-rwxr-xr-xsatellit_installer/static_files/system-base/opt/openslx/firstrun.sh (renamed from satellit_installer/static_files/system/opt/openslx/firstrun.sh)0
-rwxr-xr-xsatellit_installer/static_files/system-base/usr/local/bin/finalize (renamed from satellit_installer/static_files/system/usr/local/bin/finalize)0
-rwxr-xr-xsatellit_installer/static_files/system-base/usr/local/bin/netsetup (renamed from satellit_installer/static_files/system/usr/local/bin/netsetup)0
-rwxr-xr-xsatellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh (renamed from satellit_installer/static_files/system/etc/cron.daily/tmpdelete.sh)0
-rw-r--r--satellit_installer/static_files/system-updates/etc/locale.conf (renamed from satellit_installer/static_files/system/etc/locale.conf)0
-rw-r--r--satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides (renamed from satellit_installer/static_files/system/etc/sudoers.d/openslx-overrides)0
-rw-r--r--satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf (renamed from satellit_installer/static_files/system/etc/systemd/journald.conf.d/slx-overrides.conf)0
-rw-r--r--satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf (renamed from satellit_installer/static_files/system/etc/systemd/system.conf.d/10-openslx.conf)0
-rwxr-xr-xsatellit_installer/static_files/system-updates/usr/local/bin/slxlog (renamed from satellit_installer/static_files/system/usr/local/bin/slxlog)0
-rwxr-xr-xsatellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online (renamed from satellit_installer/static_files/system/usr/local/sbin/slx-wait-online)0
-rw-r--r--satellit_upgrader/updater.template.sh13
21 files changed, 6 insertions, 10 deletions
diff --git a/satellit_installer/includes/50-copyscripts.inc b/satellit_installer/includes/50-copyscripts.inc
index aee3944..5348bb9 100644
--- a/satellit_installer/includes/50-copyscripts.inc
+++ b/satellit_installer/includes/50-copyscripts.inc
@@ -1,6 +1,7 @@
install_system_scripts() {
# Different stuff like slxlog, finalize, firstrun, netsetup
- install_files "system"
+ install_files "system-base"
+ install_files "system-updates"
}
install_timesync() {
diff --git a/satellit_installer/static_files/system/etc/apt/apt.conf.d/99update-config b/satellit_installer/static_files/system-base/etc/apt/apt.conf.d/99update-config
index 0f66e29..0f66e29 100644
--- a/satellit_installer/static_files/system/etc/apt/apt.conf.d/99update-config
+++ b/satellit_installer/static_files/system-base/etc/apt/apt.conf.d/99update-config
diff --git a/satellit_installer/static_files/system/etc/issue b/satellit_installer/static_files/system-base/etc/issue
index a097cee..a097cee 100644
--- a/satellit_installer/static_files/system/etc/issue
+++ b/satellit_installer/static_files/system-base/etc/issue
diff --git a/satellit_installer/static_files/system/etc/issue.disabled b/satellit_installer/static_files/system-base/etc/issue.disabled
index 078ef2a..078ef2a 100644
--- a/satellit_installer/static_files/system/etc/issue.disabled
+++ b/satellit_installer/static_files/system-base/etc/issue.disabled
diff --git a/satellit_installer/static_files/system/etc/mysql/conf.d/99-openslx.cnf b/satellit_installer/static_files/system-base/etc/mysql/conf.d/99-openslx.cnf
index f4ff6f7..f4ff6f7 100644
--- a/satellit_installer/static_files/system/etc/mysql/conf.d/99-openslx.cnf
+++ b/satellit_installer/static_files/system-base/etc/mysql/conf.d/99-openslx.cnf
diff --git a/satellit_installer/static_files/system/etc/systemd/system/firstboot.service b/satellit_installer/static_files/system-base/etc/systemd/system/firstboot.service
index f19b51a..f19b51a 100644
--- a/satellit_installer/static_files/system/etc/systemd/system/firstboot.service
+++ b/satellit_installer/static_files/system-base/etc/systemd/system/firstboot.service
diff --git a/satellit_installer/static_files/system/etc/tmux.conf b/satellit_installer/static_files/system-base/etc/tmux.conf
index 537f52c..537f52c 100644
--- a/satellit_installer/static_files/system/etc/tmux.conf
+++ b/satellit_installer/static_files/system-base/etc/tmux.conf
diff --git a/satellit_installer/static_files/system/etc/vim/vimrc.local b/satellit_installer/static_files/system-base/etc/vim/vimrc.local
index 4bfb95d..4bfb95d 100644
--- a/satellit_installer/static_files/system/etc/vim/vimrc.local
+++ b/satellit_installer/static_files/system-base/etc/vim/vimrc.local
diff --git a/satellit_installer/static_files/system/opt/openslx/bashrc.inc b/satellit_installer/static_files/system-base/opt/openslx/bashrc.inc
index b5fa467..b5fa467 100644
--- a/satellit_installer/static_files/system/opt/openslx/bashrc.inc
+++ b/satellit_installer/static_files/system-base/opt/openslx/bashrc.inc
diff --git a/satellit_installer/static_files/system/opt/openslx/firstboot.sh b/satellit_installer/static_files/system-base/opt/openslx/firstboot.sh
index fe75c1d..fe75c1d 100755
--- a/satellit_installer/static_files/system/opt/openslx/firstboot.sh
+++ b/satellit_installer/static_files/system-base/opt/openslx/firstboot.sh
diff --git a/satellit_installer/static_files/system/opt/openslx/firstrun.sh b/satellit_installer/static_files/system-base/opt/openslx/firstrun.sh
index 1238cc5..1238cc5 100755
--- a/satellit_installer/static_files/system/opt/openslx/firstrun.sh
+++ b/satellit_installer/static_files/system-base/opt/openslx/firstrun.sh
diff --git a/satellit_installer/static_files/system/usr/local/bin/finalize b/satellit_installer/static_files/system-base/usr/local/bin/finalize
index 1be85e2..1be85e2 100755
--- a/satellit_installer/static_files/system/usr/local/bin/finalize
+++ b/satellit_installer/static_files/system-base/usr/local/bin/finalize
diff --git a/satellit_installer/static_files/system/usr/local/bin/netsetup b/satellit_installer/static_files/system-base/usr/local/bin/netsetup
index a824739..a824739 100755
--- a/satellit_installer/static_files/system/usr/local/bin/netsetup
+++ b/satellit_installer/static_files/system-base/usr/local/bin/netsetup
diff --git a/satellit_installer/static_files/system/etc/cron.daily/tmpdelete.sh b/satellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh
index 9e68658..9e68658 100755
--- a/satellit_installer/static_files/system/etc/cron.daily/tmpdelete.sh
+++ b/satellit_installer/static_files/system-updates/etc/cron.daily/tmpdelete.sh
diff --git a/satellit_installer/static_files/system/etc/locale.conf b/satellit_installer/static_files/system-updates/etc/locale.conf
index f9c983c..f9c983c 100644
--- a/satellit_installer/static_files/system/etc/locale.conf
+++ b/satellit_installer/static_files/system-updates/etc/locale.conf
diff --git a/satellit_installer/static_files/system/etc/sudoers.d/openslx-overrides b/satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides
index 5cfa7d0..5cfa7d0 100644
--- a/satellit_installer/static_files/system/etc/sudoers.d/openslx-overrides
+++ b/satellit_installer/static_files/system-updates/etc/sudoers.d/openslx-overrides
diff --git a/satellit_installer/static_files/system/etc/systemd/journald.conf.d/slx-overrides.conf b/satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf
index 05a33d2..05a33d2 100644
--- a/satellit_installer/static_files/system/etc/systemd/journald.conf.d/slx-overrides.conf
+++ b/satellit_installer/static_files/system-updates/etc/systemd/journald.conf.d/slx-overrides.conf
diff --git a/satellit_installer/static_files/system/etc/systemd/system.conf.d/10-openslx.conf b/satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf
index 0e40b02..0e40b02 100644
--- a/satellit_installer/static_files/system/etc/systemd/system.conf.d/10-openslx.conf
+++ b/satellit_installer/static_files/system-updates/etc/systemd/system.conf.d/10-openslx.conf
diff --git a/satellit_installer/static_files/system/usr/local/bin/slxlog b/satellit_installer/static_files/system-updates/usr/local/bin/slxlog
index 55110ae..55110ae 100755
--- a/satellit_installer/static_files/system/usr/local/bin/slxlog
+++ b/satellit_installer/static_files/system-updates/usr/local/bin/slxlog
diff --git a/satellit_installer/static_files/system/usr/local/sbin/slx-wait-online b/satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online
index f4b41dc..f4b41dc 100755
--- a/satellit_installer/static_files/system/usr/local/sbin/slx-wait-online
+++ b/satellit_installer/static_files/system-updates/usr/local/sbin/slx-wait-online
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index 9ecbc88..3a0f3d2 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -171,7 +171,7 @@ install_files () {
local SRC="$FILEDIR/$1"
local files file ret
[ -d "$SRC" ] || perror "NO SUCH DIRECTORY: $SRC"
- readarray -t -d '' files < <( find "$SRC" -type f -print0 )
+ readarray -t -d '' files < <( find "$SRC" \( -type f -o -type l \) -print0 )
ret=1
for file in "${files[@]}"; do
diffcp "$1" "${file#$SRC}" && ret=0
@@ -378,8 +378,7 @@ failprint apt autoremove -y
## Enable unix socket passwordless local connection (commented out since default in Debian 9+ anyways)
#mysql -e "UPDATE user SET plugin = 'unix_socket' WHERE Host = 'localhost' AND User = 'root'"
-# Fix locale to C.UTF-8 for systemd
-diffcp "system" "/etc/locale.conf"
+install_files "system-updates"
# ********************** Taskmanager ***********************
# Do this first in case one of the later updates depends on the taskmanager
@@ -853,7 +852,7 @@ if ! which tmate &> /dev/null && (( MAJOR >= 9 )); then
fi
if (( MAJOR >= 11 )); then
# Fingerprints now need to be SHA256, maybe an old sat got dist-upgraded and still has MD5s in that file
- diffcp "system" "/etc/tmux.conf" "Updating tmate config..."
+ diffcp "system-base" "/etc/tmux.conf" "Updating tmate config..."
rm -f -- "/root/.tmate.conf"
fi
@@ -865,11 +864,7 @@ if ! [ -s /root/.ssh/id_rsa ]; then
fi
# Timesync
-diffcp "system" "/usr/local/sbin/slx-wait-online"
-diffcp "timesync" "/etc/systemd/system/redneck-timesync.service"
-diffcp "timesync" "/usr/local/sbin/redneck-timesync.sh"
-mkdir -p "/etc/systemd/system/network-online.target.wants"
-ln -nfs "../redneck-timesync.service" "/etc/systemd/system/network-online.target.wants/redneck-timesync.service"
+install_files "timesync"
# Wait for webif callbacks and IPXE compile
echo -n "Finishing."