From 834d818a5b11c2b9a9f8ec622d522d213a35edd0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 19 Oct 2023 13:27:49 +0200 Subject: [SSPS] Make sure firstrun.sh properly deletes itself after use --- satellit_installer/includes/10-script_dropper.inc | 2 +- satellit_installer/static_files/system/opt/openslx/firstrun.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'satellit_installer') diff --git a/satellit_installer/includes/10-script_dropper.inc b/satellit_installer/includes/10-script_dropper.inc index a991f28..11ab9b9 100644 --- a/satellit_installer/includes/10-script_dropper.inc +++ b/satellit_installer/includes/10-script_dropper.inc @@ -4,7 +4,7 @@ fb_enable_firstrun() { if ! grep -qF "$script" "/home/openslx/.profile"; then echo "# Patching openslx's .profile" echo "[ -t 0 ] && $script" >> "/home/openslx/.profile" - chown openslx:openslx "/home/openslx/.profile" + chown openslx:openslx "/home/openslx/.profile" "$script" fi } diff --git a/satellit_installer/static_files/system/opt/openslx/firstrun.sh b/satellit_installer/static_files/system/opt/openslx/firstrun.sh index fc22959..0ffc6a5 100755 --- a/satellit_installer/static_files/system/opt/openslx/firstrun.sh +++ b/satellit_installer/static_files/system/opt/openslx/firstrun.sh @@ -47,6 +47,7 @@ cat < YONDERDOC +sed -i "/opt.openslx.firstrun.sh/d" ~/.profile unlink /opt/openslx/firstrun.sh sudo reboot -- cgit v1.2.3-55-g7522