anchor.diff:      install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
       echo "d ${localstatedir}/log/samba 0755 root root -" \
           >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
  -    if ${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'true', 'false', d)}; then
  +    if [ "${LSB}" = "lsb" ]; then
           install -d ${D}${sysconfdir}/init.d
           install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
       else
  
positive.code: SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
  SYSTEMD_SERVICE_winbind = "winbind.service"
  
  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVINITTYPE}', '', d)} \
                     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                     ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'zeroconf', '', d)} \
                     acl cups ldap \
  "
  
  RDEPENDS_${PN}-base += "${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'lsb', '', d)}"
  RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
  
  PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
  PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
  PACKAGECONFIG[lsb] = ",,lsb"
  PACKAGECONFIG[sysv] = ",,sysvinit"
  PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
  PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
  PACKAGECONFIG[sasl] = ",,cyrus-sasl"
  
negative.code: CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
  LDFLAGS_append_libc-musl = " -ltirpc"
  
  LSB = ""
  LSB_linuxstdbase = "lsb"
  
  INITSCRIPT_NAME = "samba"
  INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
  