endif
endif
-if bashcompletiondir != 'no'
- bash_systemctl = configure_file(
- input : 'systemctl.in',
- output : 'systemctl',
- configuration : substs)
+custom_target(
+ 'systemctl',
+ input : 'systemctl.in',
+ output : 'systemctl',
+ command : [meson_render_jinja2, config_h, '@INPUT@'],
+ capture : true,
+ install : bashcompletiondir != 'no',
+ install_dir : bashcompletiondir)
- items = [['busctl', ''],
- ['journalctl', ''],
- ['systemd-analyze', ''],
- ['systemd-cat', ''],
- ['systemd-cgls', ''],
- ['systemd-cgtop', ''],
- ['systemd-delta', ''],
- ['systemd-detect-virt', ''],
- ['systemd-id128', ''],
- ['systemd-nspawn', ''],
- ['systemd-path', ''],
- ['systemd-run', ''],
- ['udevadm', ''],
- ['kernel-install', ''],
- [bash_systemctl, ''],
- ['bootctl', 'ENABLE_EFI'],
- ['coredumpctl', 'ENABLE_COREDUMP'],
- ['homectl', 'ENABLE_HOMED'],
- ['hostnamectl', 'ENABLE_HOSTNAMED'],
- ['localectl', 'ENABLE_LOCALED'],
- ['loginctl', 'ENABLE_LOGIND'],
- ['machinectl', 'ENABLE_MACHINED'],
- ['networkctl', 'ENABLE_NETWORKD'],
- ['portablectl', 'ENABLE_PORTABLED'],
- ['resolvectl', 'ENABLE_RESOLVE'],
- ['systemd-resolve', 'ENABLE_RESOLVE'],
- ['timedatectl', 'ENABLE_TIMEDATED'],
- ]
+items = [['busctl', ''],
+ ['journalctl', ''],
+ ['systemd-analyze', ''],
+ ['systemd-cat', ''],
+ ['systemd-cgls', ''],
+ ['systemd-cgtop', ''],
+ ['systemd-delta', ''],
+ ['systemd-detect-virt', ''],
+ ['systemd-id128', ''],
+ ['systemd-nspawn', ''],
+ ['systemd-path', ''],
+ ['systemd-run', ''],
+ ['udevadm', ''],
+ ['kernel-install', ''],
+ ['bootctl', 'ENABLE_EFI'],
+ ['coredumpctl', 'ENABLE_COREDUMP'],
+ ['homectl', 'ENABLE_HOMED'],
+ ['hostnamectl', 'ENABLE_HOSTNAMED'],
+ ['localectl', 'ENABLE_LOCALED'],
+ ['loginctl', 'ENABLE_LOGIND'],
+ ['machinectl', 'ENABLE_MACHINED'],
+ ['networkctl', 'ENABLE_NETWORKD'],
+ ['portablectl', 'ENABLE_PORTABLED'],
+ ['resolvectl', 'ENABLE_RESOLVE'],
+ ['systemd-resolve', 'ENABLE_RESOLVE'],
+ ['timedatectl', 'ENABLE_TIMEDATED']]
- foreach item : items
- if item[1] == '' or conf.get(item[1]) == 1
- install_data(item[0],
- install_dir : bashcompletiondir)
- endif
- endforeach
-endif
+foreach item : items
+ if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
+ install_data(item[0],
+ install_dir : bashcompletiondir)
+ endif
+endforeach
}
__systemd_properties() {
- @rootlibexecdir@/systemd --dump-bus-properties
+ {{ROOTLIBEXECDIR}}/systemd --dump-bus-properties
}
__contains_word () {
done
}
+{% raw -%}
__filter_units_by_properties () {
local mode=$1 properties=$2; shift 2
local units=("$@")
echo $names
fi
}
+{% endraw %}
__get_all_units () { { __systemctl $1 list-unit-files "$2*"; __systemctl $1 list-units --all "$2*"; } \
| { while read -r a b; do echo " $a"; done; }; }
if ( [[ ${+_sys_all_properties} -eq 0 ]] || _cache_invalid SYS_ALL_PROPERTIES$_sys_service_mgr ) ||
! _retrieve_cache SYS_ALL_PROPERTIES$_sys_service_mgr;
then
- _sys_all_properties=( ${${(M)${(f)"$(@rootlibexecdir@/systemd --dump-bus-properties)"}}} )
+ _sys_all_properties=( ${${(M)${(f)"$({{ROOTLIBEXECDIR}}/systemd --dump-bus-properties)"}}} )
_store_cache SYS_ALL_PROPERTIES$_sys_service_mgr _sys_all_properties
fi
_values -s , "${_sys_all_properties[@]}"
zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
endif
-if zshcompletiondir != 'no'
- zsh_systemctl = configure_file(
- input : '_systemctl.in',
- output : '_systemctl',
- configuration : substs)
+custom_target(
+ '_systemctl',
+ input : '_systemctl.in',
+ output : '_systemctl',
+ command : [meson_render_jinja2, config_h, '@INPUT@'],
+ capture : true,
+ install : zshcompletiondir != 'no',
+ install_dir : zshcompletiondir)
- items = [['_busctl', ''],
- ['_journalctl', ''],
- ['_systemd-analyze', ''],
- ['_systemd-delta', ''],
- ['_systemd-nspawn', ''],
- ['_systemd', ''],
- ['_systemd-path', ''],
- ['_systemd-run', ''],
- ['_udevadm', ''],
- ['_kernel-install', ''],
- ['_sd_hosts_or_user_at_host', ''],
- ['_sd_outputmodes', ''],
- ['_sd_unit_files', ''],
- ['_sd_machines', ''],
- [zsh_systemctl, ''],
- ['_bootctl', 'ENABLE_EFI'],
- ['_coredumpctl', 'ENABLE_COREDUMP'],
- ['_hostnamectl', 'ENABLE_HOSTNAMED'],
- ['_localectl', 'ENABLE_LOCALED'],
- ['_loginctl', 'ENABLE_LOGIND'],
- ['_machinectl', 'ENABLE_MACHINED'],
- ['_networkctl', 'ENABLE_NETWORKD'],
- ['_systemd-inhibit', 'ENABLE_LOGIND'],
- ['_resolvectl', 'ENABLE_RESOLVE'],
- ['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
- ['_timedatectl', 'ENABLE_TIMEDATED'],
- ]
+items = [['_busctl', ''],
+ ['_journalctl', ''],
+ ['_systemd-analyze', ''],
+ ['_systemd-delta', ''],
+ ['_systemd-nspawn', ''],
+ ['_systemd', ''],
+ ['_systemd-path', ''],
+ ['_systemd-run', ''],
+ ['_udevadm', ''],
+ ['_kernel-install', ''],
+ ['_sd_hosts_or_user_at_host', ''],
+ ['_sd_outputmodes', ''],
+ ['_sd_unit_files', ''],
+ ['_sd_machines', ''],
+ ['_bootctl', 'ENABLE_EFI'],
+ ['_coredumpctl', 'ENABLE_COREDUMP'],
+ ['_hostnamectl', 'ENABLE_HOSTNAMED'],
+ ['_localectl', 'ENABLE_LOCALED'],
+ ['_loginctl', 'ENABLE_LOGIND'],
+ ['_machinectl', 'ENABLE_MACHINED'],
+ ['_networkctl', 'ENABLE_NETWORKD'],
+ ['_systemd-inhibit', 'ENABLE_LOGIND'],
+ ['_resolvectl', 'ENABLE_RESOLVE'],
+ ['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
+ ['_timedatectl', 'ENABLE_TIMEDATED']]
- foreach item : items
- if item[1] == '' or conf.get(item[1]) == 1
- install_data(item[0],
- install_dir : zshcompletiondir)
- endif
- endforeach
-endif
+foreach item : items
+ if zshcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
+ install_data(item[0],
+ install_dir : zshcompletiondir)
+ endif
+endforeach