mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 14:31:02 +02:00
net-fs/nfs-utils: get rid of exports, old service, and openrc condf.d files
This commit is contained in:
parent
e91b8b66ff
commit
e7fd35ad48
@ -1 +0,0 @@
|
|||||||
# /etc/exports: NFS file systems being exported. See exports(5).
|
|
@ -1,38 +0,0 @@
|
|||||||
# /etc/conf.d/nfs
|
|
||||||
|
|
||||||
# If you wish to set the port numbers for lockd,
|
|
||||||
# please see /etc/sysctl.conf
|
|
||||||
|
|
||||||
# Optional services to include in default `/etc/init.d/nfs start`
|
|
||||||
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
|
|
||||||
NFS_NEEDED_SERVICES=""
|
|
||||||
|
|
||||||
# Number of servers to be started up by default
|
|
||||||
OPTS_RPC_NFSD="8"
|
|
||||||
|
|
||||||
# Options to pass to rpc.mountd
|
|
||||||
# ex. OPTS_RPC_MOUNTD="-p 32767"
|
|
||||||
OPTS_RPC_MOUNTD=""
|
|
||||||
|
|
||||||
# Options to pass to rpc.statd
|
|
||||||
# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
|
|
||||||
OPTS_RPC_STATD=""
|
|
||||||
|
|
||||||
# Options to pass to rpc.idmapd
|
|
||||||
OPTS_RPC_IDMAPD=""
|
|
||||||
|
|
||||||
# Options to pass to rpc.gssd
|
|
||||||
OPTS_RPC_GSSD=""
|
|
||||||
|
|
||||||
# Options to pass to rpc.svcgssd
|
|
||||||
OPTS_RPC_SVCGSSD=""
|
|
||||||
|
|
||||||
# Options to pass to rpc.rquotad (requires sys-fs/quota)
|
|
||||||
OPTS_RPC_RQUOTAD=""
|
|
||||||
|
|
||||||
# Timeout (in seconds) for exportfs
|
|
||||||
EXPORTFS_TIMEOUT=30
|
|
||||||
|
|
||||||
# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
|
|
||||||
# Format is <option>=<value>. Multiple options are allowed.
|
|
||||||
#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
|
|
@ -5,8 +5,7 @@ Requires=rpcbind.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
EnvironmentFile=/etc/conf.d/nfs
|
ExecStart=/usr/sbin/rpc.nfsd 8
|
||||||
ExecStart=/usr/sbin/rpc.nfsd $OPTS_RPC_NFSD
|
|
||||||
ExecStartPost=/usr/sbin/exportfs -a
|
ExecStartPost=/usr/sbin/exportfs -a
|
||||||
ExecStop=/usr/sbin/rpc.nfsd 0
|
ExecStop=/usr/sbin/rpc.nfsd 0
|
||||||
ExecStopPost=/usr/sbin/exportfs -a -u
|
ExecStopPost=/usr/sbin/exportfs -a -u
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=NFS server
|
|
||||||
After=rpcbind.service
|
|
||||||
Requires=rpcbind.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=/usr/sbin/rpc.nfsd 8
|
|
||||||
ExecStartPost=/usr/sbin/exportfs -a
|
|
||||||
ExecStop=/usr/sbin/rpc.nfsd 0
|
|
||||||
ExecStopPost=/usr/sbin/exportfs -a -u
|
|
||||||
RemainAfterExit=yes
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -1,7 +0,0 @@
|
|||||||
# You will need to set the dependencies in the nfsmount script to match
|
|
||||||
# the network configuration tools you are using. This should be done in
|
|
||||||
# this file by following the examples below, and not by changing the
|
|
||||||
# service script itself. See /etc/conf.d/netmount for more examples.
|
|
||||||
#
|
|
||||||
# This is a safe default.
|
|
||||||
rc_after="net"
|
|
@ -4,9 +4,7 @@ After=rpcbind.service nfsd.service
|
|||||||
Requires=rpcbind.service nfsd.service
|
Requires=rpcbind.service nfsd.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
ExecStart=/usr/sbin/rpc.mountd -F
|
||||||
EnvironmentFile=/etc/conf.d/nfs
|
|
||||||
ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=NFS Mount Daemon
|
|
||||||
After=rpcbind.service nfsd.service
|
|
||||||
Requires=rpcbind.service nfsd.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/rpc.mountd -F
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -3,11 +3,10 @@ Description=NFSv2/3 Network Status Monitor Daemon
|
|||||||
After=rpcbind.service
|
After=rpcbind.service
|
||||||
Requires=rpcbind.service
|
Requires=rpcbind.service
|
||||||
Before=remote-fs-pre.target
|
Before=remote-fs-pre.target
|
||||||
|
Wants=remote-fs-pre.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
ExecStart=/sbin/rpc.statd -F
|
||||||
EnvironmentFile=/etc/conf.d/nfs
|
|
||||||
ExecStart=/sbin/rpc.statd $OPTS_RPC_STATD
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=NFSv2/3 Network Status Monitor Daemon
|
|
||||||
After=rpcbind.service
|
|
||||||
Requires=rpcbind.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
Wants=remote-fs-pre.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
EnvironmentFile=/etc/conf.d/nfs
|
|
||||||
ExecStart=/sbin/rpc.statd $OPTS_RPC_STATD
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -1,12 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=NFSv2/3 Network Status Monitor Daemon
|
|
||||||
After=rpcbind.service
|
|
||||||
Requires=rpcbind.service
|
|
||||||
Before=remote-fs-pre.target
|
|
||||||
Wants=remote-fs-pre.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/sbin/rpc.statd -F
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
@ -109,21 +109,10 @@ src_install() {
|
|||||||
doins id_resolver.conf
|
doins id_resolver.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local f opt_need=""
|
|
||||||
if use nfsv4 ; then
|
|
||||||
opt_need="rpc.idmapd"
|
|
||||||
fi
|
|
||||||
for f in nfs nfsmount ; do
|
|
||||||
newconfd "${FILESDIR}"/${f}.confd ${f}
|
|
||||||
done
|
|
||||||
sed -i \
|
|
||||||
-e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
|
|
||||||
"${ED}"/etc/conf.d/nfs || die #234132
|
|
||||||
|
|
||||||
systemd_dotmpfilesd "${FILESDIR}"/nfs-utils.conf
|
systemd_dotmpfilesd "${FILESDIR}"/nfs-utils.conf
|
||||||
systemd_newunit "${FILESDIR}"/nfsd.service-r1 nfsd.service
|
systemd_dounit "${FILESDIR}"/nfsd.service
|
||||||
systemd_newunit "${FILESDIR}"/rpc-statd.service-r2 rpc-statd.service
|
systemd_dounit "${FILESDIR}"/rpc-statd.service
|
||||||
systemd_newunit "${FILESDIR}"/rpc-mountd.service-r1 rpc-mountd.service
|
systemd_dounit "${FILESDIR}"/rpc-mountd.service
|
||||||
systemd_dounit "${FILESDIR}"/rpc-idmapd.service
|
systemd_dounit "${FILESDIR}"/rpc-idmapd.service
|
||||||
systemd_dounit "${FILESDIR}"/{proc-fs-nfsd,var-lib-nfs-rpc_pipefs}.mount
|
systemd_dounit "${FILESDIR}"/{proc-fs-nfsd,var-lib-nfs-rpc_pipefs}.mount
|
||||||
use nfsv4 && use kerberos && systemd_dounit "${FILESDIR}"/rpc-{gssd,svcgssd}.service
|
use nfsv4 && use kerberos && systemd_dounit "${FILESDIR}"/rpc-{gssd,svcgssd}.service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user