mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 23:11:07 +02:00
sys-libs/glibc: install nscd service files
The actual nscd binary has been installed since sssd was added, but none of the systemd configuration files were included. This resulted in a binary that would not start due to a missing /run directory. The upstream nscd.conf is installed in /usr and linked into /etc.
This commit is contained in:
parent
51e22be86d
commit
86421136e6
@ -144,7 +144,7 @@ toolchain-glibc_src_install() {
|
|||||||
# - The SDK just gets the full locale archive, no need for locale-gen.
|
# - The SDK just gets the full locale archive, no need for locale-gen.
|
||||||
# - CoreOS targets (which are cross compiled) don't get any locales.
|
# - CoreOS targets (which are cross compiled) don't get any locales.
|
||||||
# - Config files are installed by baselayout, not glibc.
|
# - Config files are installed by baselayout, not glibc.
|
||||||
# - Forget about nscd for now, we have the use flag off anyway.
|
# - Install nscd/systemd stuff in /usr.
|
||||||
|
|
||||||
if ! tc-is-cross-compiler ; then
|
if ! tc-is-cross-compiler ; then
|
||||||
emake install_root="${D}$(alt_prefix)" localedata/install-locales || die
|
emake install_root="${D}$(alt_prefix)" localedata/install-locales || die
|
||||||
@ -166,10 +166,21 @@ toolchain-glibc_src_install() {
|
|||||||
# Clean out any default configs
|
# Clean out any default configs
|
||||||
rm -rf "${ED}"/etc
|
rm -rf "${ED}"/etc
|
||||||
|
|
||||||
|
cd "${S}"
|
||||||
|
|
||||||
|
# Install misc network config files
|
||||||
|
insinto /usr/share/baselayout
|
||||||
|
doins nscd/nscd.conf || die
|
||||||
|
|
||||||
|
if ! in_iuse nscd || use nscd ; then
|
||||||
|
systemd_dounit nscd/nscd.service || die
|
||||||
|
systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf || die
|
||||||
|
systemd_newtmpfilesd "${FILESDIR}"/nscd-conf.tmpfiles nscd-conf.conf || die
|
||||||
|
fi
|
||||||
|
|
||||||
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
|
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
|
||||||
doenvd "${T}"/00glibc || die
|
doenvd "${T}"/00glibc || die
|
||||||
|
|
||||||
cd "${S}"
|
|
||||||
for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
|
for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
|
||||||
[[ -s ${d} ]] && dodoc ${d}
|
[[ -s ${d} ]] && dodoc ${d}
|
||||||
done
|
done
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
#!/sbin/openrc-run
|
|
||||||
# Copyright 1999-2005 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use dns ldap net slapd
|
|
||||||
}
|
|
||||||
|
|
||||||
checkconfig() {
|
|
||||||
if [ ! -d /var/run/nscd ] ; then
|
|
||||||
mkdir -p /var/run/nscd
|
|
||||||
chmod 755 /var/run/nscd
|
|
||||||
fi
|
|
||||||
if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
|
|
||||||
echo ""
|
|
||||||
ewarn "nscd run dir is not world readable, you should reset the perms:"
|
|
||||||
ewarn "chmod 755 /var/run/nscd"
|
|
||||||
ewarn "chmod a+rw /var/run/nscd/socket"
|
|
||||||
echo ""
|
|
||||||
ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
checkconfig
|
|
||||||
|
|
||||||
ebegin "Starting Name Service Cache Daemon"
|
|
||||||
local secure=`while read curline ; do
|
|
||||||
table=${curline%:*}
|
|
||||||
entries=${curline##$table:}
|
|
||||||
table=${table%%[^a-z]*}
|
|
||||||
case $table in
|
|
||||||
passwd*|group*|hosts)
|
|
||||||
for entry in $entries ; do
|
|
||||||
case $entry in
|
|
||||||
nisplus*)
|
|
||||||
/usr/sbin/nscd_nischeck $table || \
|
|
||||||
/echo "-S $table,yes"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done < /etc/nsswitch.conf`
|
|
||||||
local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)"
|
|
||||||
mkdir -p "$(dirname ${pidfile})"
|
|
||||||
save_options pidfile "${pidfile}"
|
|
||||||
start-stop-daemon --start --quiet \
|
|
||||||
--exec /usr/sbin/nscd --pidfile "${pidfile}" \
|
|
||||||
-- $secure
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
local pidfile="$(get_options pidfile)"
|
|
||||||
[ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}"
|
|
||||||
ebegin "Shutting down Name Service Cache Daemon"
|
|
||||||
start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
# vim:ts=4
|
|
2
sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles
vendored
Normal file
2
sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
L /etc/nscd.conf - - - - ../usr/share/baselayout/nscd.conf
|
||||||
|
d /var/db/nscd - - - - -
|
@ -1,15 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Name Service Cache Daemon
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/nscd -F
|
|
||||||
ExecStop=/usr/sbin/nscd --shutdown
|
|
||||||
ExecReload=/usr/sbin/nscd -i passwd
|
|
||||||
ExecReload=/usr/sbin/nscd -i group
|
|
||||||
ExecReload=/usr/sbin/nscd -i hosts
|
|
||||||
ExecReload=/usr/sbin/nscd -i services
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -1,4 +0,0 @@
|
|||||||
# Configuration to create /run/nscd directory
|
|
||||||
# Used as part of systemd's tmpfiles
|
|
||||||
|
|
||||||
d /run/nscd 0755 root root
|
|
@ -1,24 +0,0 @@
|
|||||||
# /etc/nsswitch.conf:
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
passwd: compat
|
|
||||||
shadow: compat
|
|
||||||
group: compat
|
|
||||||
|
|
||||||
# passwd: db files nis
|
|
||||||
# shadow: db files nis
|
|
||||||
# group: db files nis
|
|
||||||
|
|
||||||
hosts: files dns
|
|
||||||
networks: files dns
|
|
||||||
|
|
||||||
services: db files
|
|
||||||
protocols: db files
|
|
||||||
rpc: db files
|
|
||||||
ethers: db files
|
|
||||||
netmasks: files
|
|
||||||
netgroup: files
|
|
||||||
bootparams: files
|
|
||||||
|
|
||||||
automount: files
|
|
||||||
aliases: files
|
|
Loading…
x
Reference in New Issue
Block a user