diff options
author | Vinit Agnihotri <vagnihotri@ddn.com> | 2022-03-01 17:24:06 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-04-06 06:34:37 +0000 |
commit | 93824b8c331cd43fea1d22a2d110e4e27fb0a02e (patch) | |
tree | 0938005f08dda5770461603562f238254a806412 | |
parent | 2f6b31788bbb853ace48e0e52813bb1b8c4feec2 (diff) | |
download | samba-93824b8c331cd43fea1d22a2d110e4e27fb0a02e.tar.gz |
packaging: move CTDB service file to top-level
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r-- | packaging/systemd/ctdb.service.in (renamed from ctdb/config/ctdb.service) | 8 | ||||
-rw-r--r-- | packaging/wscript | 7 | ||||
-rw-r--r-- | packaging/wscript_build | 6 |
3 files changed, 17 insertions, 4 deletions
diff --git a/ctdb/config/ctdb.service b/packaging/systemd/ctdb.service.in index dbe35281f56..4494f914cff 100644 --- a/ctdb/config/ctdb.service +++ b/packaging/systemd/ctdb.service.in @@ -2,16 +2,16 @@ Description=CTDB Documentation=man:ctdbd(1) man:ctdb(7) After=network-online.target time-sync.target -ConditionFileNotEmpty=/etc/ctdb/nodes +ConditionFileNotEmpty=@CTDB_ETCDIR@/nodes [Service] Type=forking LimitCORE=infinity LimitNOFILE=1048576 TasksMax=4096 -PIDFile=/run/ctdb/ctdbd.pid -ExecStart=/usr/sbin/ctdbd_wrapper start -ExecStop=/usr/sbin/ctdbd_wrapper stop +PIDFile=@CTDB_RUNDIR@/ctdbd.pid +ExecStart=@SBINDIR@/ctdbd_wrapper start +ExecStop=@SBINDIR@/ctdbd_wrapper stop KillMode=control-group Restart=no diff --git a/packaging/wscript b/packaging/wscript index 1f9a54a787d..ab8e16f1ab9 100644 --- a/packaging/wscript +++ b/packaging/wscript @@ -41,10 +41,17 @@ def options(opt): +" Can be used multiple times."), action="append", dest="systemd_samba_extra", default=[]) + gr.add_option('--systemd-ctdb-extra', + metavar="Option=Value", + help=("Extra directives added to the ctdb service file." + +" Can be given multiple times."), + action="append", dest="systemd_ctdb_extra", default=[]) + def configure(conf): conf.env.systemd_install_services = Options.options.systemd_install_services conf.env.systemd_smb_extra = '\n'.join(Options.options.systemd_smb_extra) conf.env.systemd_nmb_extra = '\n'.join(Options.options.systemd_nmb_extra) conf.env.systemd_winbind_extra = '\n'.join(Options.options.systemd_winbind_extra) conf.env.systemd_samba_extra = '\n'.join(Options.options.systemd_samba_extra) + conf.env.systemd_ctdb_extra = '\n'.join(Options.options.systemd_ctdb_extra) conf.env.SYSTEMDDIR = Options.options.SYSTEMDDIR diff --git a/packaging/wscript_build b/packaging/wscript_build index fbcd4e55f8c..217bd996348 100644 --- a/packaging/wscript_build +++ b/packaging/wscript_build @@ -12,5 +12,11 @@ for srv in systemd_services: if bld.env.systemd_install_services: bld.INSTALL_FILES(bld.env.SYSTEMDDIR, srv, flat=True) +if bld.env.with_ctdb: + srv = 'systemd/ctdb.service' + bld.CONFIGURE_FILE(srv) + if bld.env.systemd_install_services: + bld.INSTALL_FILES(bld.env.SYSTEMDDIR, srv, flat=True) + if bld.env.systemd_install_services: bld.INSTALL_FILES('${SYSCONFDIR}/sysconfig', 'systemd/samba.sysconfig', destname='samba') |