nscd: switch to systemd, drop openrc support.
This commit is contained in:
parent
ef7b805b5d
commit
2057dd4432
5 changed files with 30 additions and 30 deletions
|
@ -1,23 +0,0 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
command=/usr/sbin/nscd
|
||||
pidfile=/var/run/nscd/nscd.pid
|
||||
|
||||
depend()
|
||||
{
|
||||
use dns ldap net slapd
|
||||
}
|
||||
|
||||
start_pre()
|
||||
{
|
||||
if [ ! -d /var/run/nscd ]; then
|
||||
mkdir -p /var/run/nscd
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
ebegin "Stopping nscd"
|
||||
${command} -K
|
||||
eend $?
|
||||
}
|
12
srcpkgs/glibc/files/nscd.service
Normal file
12
srcpkgs/glibc/files/nscd.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Name Service Cache Daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/nscd
|
||||
ExecStop=/usr/sbin/nscd --shutdown
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Also=nscd.socket
|
8
srcpkgs/glibc/files/nscd.socket
Normal file
8
srcpkgs/glibc/files/nscd.socket
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Name Service Cache Daemon Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/var/run/nscd/socket
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
1
srcpkgs/glibc/files/nscd.tmpfiles.d
Normal file
1
srcpkgs/glibc/files/nscd.tmpfiles.d
Normal file
|
@ -0,0 +1 @@
|
|||
d /run/nscd 755 root root
|
|
@ -5,17 +5,19 @@ long_desc="
|
|||
This package contains nscd, a daemon that provides a cache for the
|
||||
most common name service requests."
|
||||
|
||||
openrc_services="nscd default false"
|
||||
revision=1
|
||||
|
||||
systemd_services="nscd.service"
|
||||
conf_files="/etc/nscd.conf"
|
||||
|
||||
Add_dependency run glibc
|
||||
|
||||
do_install()
|
||||
{
|
||||
install -d ${DESTDIR}/usr/sbin
|
||||
mv ${SRCPKGDESTDIR}/usr/sbin/nscd ${DESTDIR}/usr/sbin
|
||||
install -D -m755 ${FILESDIR}/nscd.rc ${DESTDIR}/etc/init.d/nscd
|
||||
install -D -m644 ${FILESDIR}/nscd.conf ${DESTDIR}/etc
|
||||
install -D -m644 ${FILESDIR}/nscd.logrotate \
|
||||
${DESTDIR}/etc/logrotate.d/nscd
|
||||
vmove usr/sbin/nscd usr/sbin
|
||||
vinstall ${FILESDIR}/nscd.service 644 lib/systemd/system
|
||||
vinstall ${FILESDIR}/nscd.socket 644 lib/systemd/system
|
||||
vinstall ${FILESDIR}/nscd.tmpfiles.d 644 usr/lib/tmpfiles.d nscd.conf
|
||||
vinstall ${FILESDIR}/nscd.conf 644 etc
|
||||
vinstall ${FILESDIR}/nscd.logrotate 644 etc/logrotate.d nscd
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue