util-iso-cal: fix disabled openrc services; write them only if defined
This commit is contained in:
parent
2e1125badf
commit
934e264c02
2 changed files with 10 additions and 8 deletions
|
@ -57,17 +57,19 @@ write_services_conf(){
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
if [[ ${initsys} == 'openrc' ]];then
|
if [[ ${initsys} == 'openrc' ]];then
|
||||||
echo 'services:' >> "$conf"
|
echo 'services:' >> "$conf"
|
||||||
for s in ${enable_openrc[@]};do
|
|
||||||
echo ' enabled:' >> "$conf"
|
echo ' enabled:' >> "$conf"
|
||||||
echo ' - name: '"$s" >> "$conf"
|
for s in ${enable_openrc[@]};do
|
||||||
|
echo " - name: $s" >> "$conf"
|
||||||
echo ' runlevel: default' >> "$conf"
|
echo ' runlevel: default' >> "$conf"
|
||||||
done
|
done
|
||||||
for s in ${disable_openrc[@]};do
|
if [[ -n ${disable_openrc[@]} ]];then
|
||||||
echo ' disabled:' >> "$conf"
|
echo ' disabled:' >> "$conf"
|
||||||
echo ' - name: '"$s" >> "$conf"
|
for s in ${disable_openrc[@]};do
|
||||||
echo ' runlevel: boot' >> "$conf"
|
echo " - name: $s" >> "$conf"
|
||||||
|
echo ' runlevel: default' >> "$conf"
|
||||||
echo '' >> "$conf"
|
echo '' >> "$conf"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo 'services:' > "$conf"
|
echo 'services:' > "$conf"
|
||||||
for s in ${enable_systemd[@]};do
|
for s in ${enable_systemd[@]};do
|
||||||
|
|
|
@ -421,7 +421,7 @@ load_profile_config(){
|
||||||
enable_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
|
enable_openrc=('acpid' 'bluetooth' 'cgmanager' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z ${disable_openrc[@]} ]] && disable_openrc=('pacman-init')
|
[[ -z ${disable_openrc[@]} ]] && disable_openrc=()
|
||||||
|
|
||||||
if [[ -z ${enable_systemd_live[@]} ]];then
|
if [[ -z ${enable_systemd_live[@]} ]];then
|
||||||
enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init')
|
enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init')
|
||||||
|
|
Loading…
Reference in a new issue