]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: disable rc-local-generator when an empty string is specified to rc-local=...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Apr 2025 13:09:12 +0000 (22:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Apr 2025 15:18:48 +0000 (00:18 +0900)
In such case, the generator is meaningless. Let's kill it.

man/rules/meson.build
man/systemd-rc-local-generator.xml
meson.build
meson_options.txt
src/rc-local-generator/meson.build

index f98a55437c792b02f53cbba66d6856b00becd4b0..c33d9fee0e4218202059c0358aa7167a96eba218 100644 (file)
@@ -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'],
index cc6068a91e1862a08a6d6d00543f68dc87fb6c6e..882c5d6e7d1b4d21e8123a17bc311170d930c7f1 100644 (file)
@@ -6,7 +6,7 @@
 ]>
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-rc-local-generator" conditional='HAVE_SYSV_COMPAT'>
+<refentry id="systemd-rc-local-generator" conditional='HAVE_SYSV_COMPAT HAVE_SYSV_RC_LOCAL'>
   <refentryinfo>
     <title>systemd-rc-local-generator</title>
     <productname>systemd</productname>
index 43858480a6baffab765098499f7e101be282363a..3357df3d319a4d5e3af8251b4e23a9eac58d7891 100644 (file)
@@ -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')
index 1e752eeb9ef142dbb1afd3474ba0434049d65af9..00963a6e4ad7fbece7492677a6c666a9009507a1 100644 (file)
@@ -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,
index e74225cd486dc8fcd8f8f216b6d1263f182f25d9..62daab2846370dc32fb407e0be05249ef6735161 100644 (file)
@@ -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',
+                ],
         },
 ]