From 3ae4799ee62ff72b0a31f33945a680c5e3dcd046 Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 21 Oct 2020 14:21:14 +0200 Subject: [PATCH] add disable_systemd_live; https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/-/issues/326 --- bin/buildiso.in | 0 data/profile.conf.example | 2 ++ lib/util-iso-image.sh | 9 +++++++++ lib/util.sh | 1 + 4 files changed, 12 insertions(+) mode change 100755 => 100644 bin/buildiso.in diff --git a/bin/buildiso.in b/bin/buildiso.in old mode 100755 new mode 100644 diff --git a/data/profile.conf.example b/data/profile.conf.example index 83904e9..7995d58 100644 --- a/data/profile.conf.example +++ b/data/profile.conf.example @@ -77,3 +77,5 @@ # names must match systemd service names # services in enable_systemd array don't need to be listed here # enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live') + +# disable_systemd_live=() diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index a200545..d7b78a3 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -262,10 +262,19 @@ configure_journald(){ sed -i 's/#\(Storage=\)auto/\1volatile/' "$conf" } +disable_srv_live(){ + for srv in ${disable_systemd_live[@]}; do + enable_systemd=(${enable_systemd[@]//*$srv*}) + done +} + configure_services(){ info "Configuring services" use_apparmor="false" apparmor_boot_args="" + + [[ ! -z $disable_systemd_live ]] && disable_srv_live + for svc in ${enable_systemd[@]}; do add_svc_sd "$1" "$svc" [[ "$svc" == "apparmor" ]] && use_apparmor="true" diff --git a/lib/util.sh b/lib/util.sh index 1cf27aa..e56b13d 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -502,6 +502,7 @@ reset_profile(){ unset enable_systemd unset disable_systemd unset enable_systemd_live + unset disable_systemd_live unset packages_desktop unset packages_mhwd unset login_shell