From: Yu Watanabe Date: Wed, 2 Apr 2025 13:09:12 +0000 (+0900) Subject: meson: disable rc-local-generator when an empty string is specified to rc-local=... X-Git-Tag: v258-rc1~944^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f25ea7a930c67aa7de4fa5c086dd4bbc5f6989;p=thirdparty%2Fsystemd.git meson: disable rc-local-generator when an empty string is specified to rc-local= meson option In such case, the generator is meaningless. Let's kill it. --- diff --git a/man/rules/meson.build b/man/rules/meson.build index f98a55437c7..c33d9fee0e4 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -1071,7 +1071,10 @@ manpages = [ '8', ['systemd-random-seed'], 'ENABLE_RANDOMSEED'], - ['systemd-rc-local-generator', '8', ['rc-local.service'], 'HAVE_SYSV_COMPAT'], + ['systemd-rc-local-generator', + '8', + ['rc-local.service'], + 'HAVE_SYSV_COMPAT HAVE_SYSV_RC_LOCAL'], ['systemd-remount-fs.service', '8', ['systemd-remount-fs'], ''], ['systemd-repart', '8', ['systemd-repart.service'], 'ENABLE_REPART'], ['systemd-resolved.service', '8', ['systemd-resolved'], 'ENABLE_RESOLVE'], diff --git a/man/systemd-rc-local-generator.xml b/man/systemd-rc-local-generator.xml index cc6068a91e1..882c5d6e7d1 100644 --- a/man/systemd-rc-local-generator.xml +++ b/man/systemd-rc-local-generator.xml @@ -6,7 +6,7 @@ ]> - + systemd-rc-local-generator systemd diff --git a/meson.build b/meson.build index 43858480a6b..3357df3d319 100644 --- a/meson.build +++ b/meson.build @@ -94,6 +94,8 @@ sysvinit_path = get_option('sysvinit-path') sysvrcnd_path = get_option('sysvrcnd-path') conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '', description : 'SysV init scripts and rcN.d links are supported') +sysvrclocal_path = get_option('rc-local') +conf.set10('HAVE_SYSV_RC_LOCAL', sysvrclocal_path != '') conf.set10('CREATE_LOG_DIRS', get_option('create-log-dirs')) if get_option('hibernate') and not get_option('initrd') diff --git a/meson_options.txt b/meson_options.txt index 1e752eeb9ef..00963a6e4ad 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -45,8 +45,8 @@ option('sysvinit-path', type : 'string', value : '/etc/init.d', description : 'the directory where the SysV init scripts are located') option('sysvrcnd-path', type : 'string', value : '/etc/rc.d', description : 'the base directory for SysV rcN.d directories') -option('rc-local', type : 'string', - value : '/etc/rc.local') +option('rc-local', type : 'string', value : '/etc/rc.local', + description : 'path to SysV rc.local script') option('initrd', type : 'boolean', description : 'install services for use when running systemd in initrd') option('compat-mutable-uid-boundaries', type : 'boolean', value : false, diff --git a/src/rc-local-generator/meson.build b/src/rc-local-generator/meson.build index e74225cd486..62daab28463 100644 --- a/src/rc-local-generator/meson.build +++ b/src/rc-local-generator/meson.build @@ -3,7 +3,10 @@ executables += [ generator_template + { 'name' : 'systemd-rc-local-generator', - 'conditions' : ['HAVE_SYSV_COMPAT'], 'sources' : files('rc-local-generator.c'), + 'conditions' : [ + 'HAVE_SYSV_COMPAT', + 'HAVE_SYSV_RC_LOCAL', + ], }, ]