From 660d27b92d99ee75e341b2a5d3e79caf843ff56b Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 4 Aug 2016 09:59:47 +0200 Subject: [PATCH] buildiso: rename services vars to make it consistent --- bin/buildiso.in | 8 ++++---- data/profile.conf.example | 14 ++++++++------ docbook/manjaro-tools.conf.xml | 4 ++-- docbook/profile.conf.xml | 8 ++++---- lib/util-iso-calamares.sh | 20 ++++++++------------ lib/util-iso-image.sh | 8 ++++---- lib/util-iso.sh | 8 ++++---- lib/util.sh | 16 ++++++++-------- 8 files changed, 42 insertions(+), 44 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 79719d2..1c1cd21 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -48,12 +48,12 @@ show_profile(){ msg2 "addgroups: %s" "${addgroups}" if [[ ${initsys} == 'systemd' ]];then - msg2 "start_systemd: %s" "${start_systemd[*]}" - msg2 "start_systemd_live: %s" "${start_systemd_live[*]}" + msg2 "enable_systemd: %s" "${enable_systemd[*]}" + msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}" msg2 "disable_systemd: %s" "${disable_systemd[*]}" else - msg2 "start_openrc: %s" "${start_openrc[*]}" - msg2 "start_openrc_live: %s" "${start_openrc_live[*]}" + msg2 "enable_openrc: %s" "${enable_openrc[*]}" + msg2 "enable_openrc_live: %s" "${enable_openrc_live[*]}" msg2 "disable_openrc: %s" "${disable_openrc[*]}" fi if ${torrent};then diff --git a/data/profile.conf.example b/data/profile.conf.example index 9d0f8f7..8a1ec58 100644 --- a/data/profile.conf.example +++ b/data/profile.conf.example @@ -51,11 +51,13 @@ # unset defaults to given values # names must match systemd service names -# start_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') +# enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') +# disable_systemd=() # unset defaults to given values, # names must match openrc service names -# start_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager') +# enable_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager') +# disable_openrc=() ################# live-session ################# @@ -76,10 +78,10 @@ # unset defaults to given values # names must match systemd service names -# services in start_systemd array don't need to be listed here -# start_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init') +# services in enable_systemd array don't need to be listed here +# enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live') # unset defaults to given values, # names must match openrc service names -# services in start_openrc array don't need to be listed here -# start_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init') +# services in enable_openrc array don't need to be listed here +# enable_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live') diff --git a/docbook/manjaro-tools.conf.xml b/docbook/manjaro-tools.conf.xml index 0d70fe0..dc2a9be 100644 --- a/docbook/manjaro-tools.conf.xml +++ b/docbook/manjaro-tools.conf.xml @@ -266,8 +266,8 @@ Takes (the default) or . Selecting and option will change how the hostname, the displaymanager and services will be configured. - For services also controls if buildiso will use start_systemd and - start_systemd_live or start_openrc and start_openrc_live to determine + For services also controls if buildiso will use enable_systemd and + enable_systemd_live or enable_openrc and enable_openrc_live to determine the default services that will be enabled automatically. diff --git a/docbook/profile.conf.xml b/docbook/profile.conf.xml index cb143dd..f2d43b6 100644 --- a/docbook/profile.conf.xml +++ b/docbook/profile.conf.xml @@ -184,7 +184,7 @@ - start_systemd= + enable_systemd= Array of services that will be enabled in systemd systems. It has to match @@ -193,7 +193,7 @@ - start_openrc= + enable_openrc= Array of services that will be enabled in openrc systems. @@ -241,7 +241,7 @@ - start_systemd_live= + enable_systemd_live= Array of services that will be enabled in the systemd live-cd. It has to match @@ -250,7 +250,7 @@ - start_openrc_live= + enable_openrc_live= Array of services that will be enabled in the openrc live-cd. diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 363bed6..3871d66 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -57,24 +57,20 @@ write_services_conf(){ echo '' >> "$conf" if [[ ${initsys} == 'openrc' ]];then echo 'services:' >> "$conf" - for s in ${start_openrc[@]};do - echo ' - name: '"$s" >> "$conf" - echo ' mandatory: false' >> "$conf" - echo '' >> "$conf" + for s in ${enable_openrc[@]};do + echo ' enabled:' >> "$conf" + echo ' - name: '"$s" >> "$conf" + echo ' runlevel: default' >> "$conf" done - echo 'targets:' >> "$conf" - echo ' - name: "graphical"' >> "$conf" - echo ' mandatory: false' >> "$conf" - echo '' >> "$conf" - echo 'disable:' >> "$conf" for s in ${disable_openrc[@]};do - echo ' - name: '"$s" >> "$conf" - echo ' mandatory: false' >> "$conf" + echo ' disabled:' >> "$conf" + echo ' - name: '"$s" >> "$conf" + echo ' runlevel: boot' >> "$conf" echo '' >> "$conf" done else echo 'services:' > "$conf" - for s in ${start_systemd[@]};do + for s in ${enable_systemd[@]};do echo ' - name: '"$s" >> "$conf" echo ' mandatory: false' >> "$conf" echo '' >> "$conf" diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index 63a3547..0dd878d 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -323,7 +323,7 @@ configure_services(){ info "Configuring [%s]" "${initsys}" case ${initsys} in 'openrc') - for svc in ${start_openrc[@]}; do + for svc in ${enable_openrc[@]}; do add_svc_rc "$1" "$svc" done if [[ ${displaymanager} != "none" ]];then @@ -332,7 +332,7 @@ configure_services(){ fi ;; 'systemd') - for svc in ${start_systemd[@]}; do + for svc in ${enable_systemd[@]}; do add_svc_sd "$1" "$svc" done if [[ ${displaymanager} != "none" ]];then @@ -347,12 +347,12 @@ configure_services_live(){ info "Configuring [%s]" "${initsys}" case ${initsys} in 'openrc') - for svc in ${start_openrc_live[@]}; do + for svc in ${enable_openrc_live[@]}; do add_svc_rc "$1" "$svc" done ;; 'systemd') - for svc in ${start_systemd_live[@]}; do + for svc in ${enable_systemd_live[@]}; do add_svc_sd "$1" "$svc" done ;; diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 310378f..3530124 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -664,12 +664,12 @@ reset_profile(){ unset plymouth_theme unset password unset addgroups - unset start_systemd + unset enable_systemd unset disable_systemd - unset start_openrc + unset enable_openrc unset disable_openrc - unset start_systemd_live - unset start_openrc_live + unset enable_systemd_live + unset enable_openrc_live unset packages_custom unset packages_mhwd unset login_shell diff --git a/lib/util.sh b/lib/util.sh index 738adaf..fb0732b 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -413,24 +413,24 @@ load_profile_config(){ addgroups="video,power,disk,storage,optical,network,lp,scanner,wheel" fi - if [[ -z ${start_systemd[@]} ]];then - start_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') + if [[ -z ${enable_systemd[@]} ]];then + enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep') fi [[ -z ${disable_systemd[@]} ]] && disable_systemd=('pacman-init') - if [[ -z ${start_openrc[@]} ]];then - start_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager') + if [[ -z ${enable_openrc[@]} ]];then + enable_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager') fi [[ -z ${disable_openrc[@]} ]] && disable_openrc=('pacman-init') - if [[ -z ${start_systemd_live[@]} ]];then - start_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init') + if [[ -z ${enable_systemd_live[@]} ]];then + enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init') fi - if [[ -z ${start_openrc_live[@]} ]];then - start_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init') + if [[ -z ${enable_openrc_live[@]} ]];then + enable_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init') fi [[ -z ${tracker_url} ]] && tracker_url='udp://mirror.strits.dk:6969'