tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: On linux, potentially setting INIT_SYSTEM=systemd?
coypu%sdf.org@localhost writes:
> Hi folks,
>
> I needed to have a tunable for "is this a systemd system?" for a PLIST
> variable, and figured INIT_SYSTEM is the right way to put it.
>
> I'm hesitating to commit this because it might have unexpected effects,
> what should I watch out for?
Good question...
My gut reaction is that defining it based on /run/systemd is going to
result in build output changing based on various things, including
building in a chroot where systemd isn't running. And hence instead of
this I would recommend that those who want to (well, are suffering from
systemd and choose to cope by) build for systemd set INIT_SYSTEM=systemd
in mk.conf.
> And then I used it like so, to resolve a PLIST issue:
>
> diff --git a/www/yaws/Makefile b/www/yaws/Makefile
> index 4d8f8a4d2b38..7cfa5580d786 100644
> --- a/www/yaws/Makefile
> +++ b/www/yaws/Makefile
> @@ -45,6 +45,13 @@ CONF_FILES= ${EGDIR}/yaws.conf ${PKG_SYSCONFDIR}/yaws.conf
> RCD_SCRIPTS= yaws
> RCD_SCRIPT_SRC.yaws= ${WRKSRC}/scripts/netbsd/yaws.sh
>
> +PLIST_VARS+= systemd rc.d
> +.if ${INIT_SYSTEM} == "systemd"
> +PLIST.systemd= yes
> +.else
> +PLIST.rc.d= yes
> +.endif
> +
> WWWDIR= ${PREFIX}/share/yaws/www
>
> OWN_DIRS= ${VARBASE}/log/yaws
There is prior art about smf.
Home |
Main Index |
Thread Index |
Old Index