diff --git a/nfs-client.nfs.conf b/nfs-client.nfs.conf deleted file mode 100644 index 21758b6..0000000 --- a/nfs-client.nfs.conf +++ /dev/null @@ -1,4 +0,0 @@ - -# When nfs is stopped or restarted, nfs-client must too. -[Unit] -PartOf=nfs.service diff --git a/nfs-server.nfsserver.conf b/nfs-server.nfsserver.conf deleted file mode 100644 index 575e110..0000000 --- a/nfs-server.nfsserver.conf +++ /dev/null @@ -1,4 +0,0 @@ - -# When nfsserver is stopped or restarted, nfs-server must too. -[Unit] -PartOf=nfsserver.service diff --git a/nfs-utils.changes b/nfs-utils.changes index 20669e5..0616c3f 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,8 +1,14 @@ ------------------------------------------------------------------- Tue Jan 29 22:50:04 UTC 2019 - Neil Brown -- Restored nfs.service nad nfserver.service wrappers - as "install images" need these still. +- Remove service aliases - these files are deleted. + nfs.service + nfsserver.service + nfs-server.nfsserver.conf + nfs-client.nfs.conf + + Now the upstream standard service names "nfs-client" and "nfs-server" + must be used. ------------------------------------------------------------------- Tue Dec 4 00:03:00 UTC 2018 - Neil Brown diff --git a/nfs-utils.spec b/nfs-utils.spec index 1402159..ea2691f 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -38,10 +38,6 @@ Source7: fw-client Source8: fw-server Source11: idmapd.conf Source13: nfs-utils.rpmlintrc -Source15: nfsserver.service -Source16: nfs.service -Source17: nfs-server.nfsserver.conf -Source18: nfs-client.nfs.conf Source20: nfs-mountd.options.conf Source21: nfs-server.options.conf Source22: rpc-gssd.options.conf @@ -188,10 +184,6 @@ done %install make %{?_smp_mflags} DESTDIR=%{buildroot} install -install -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/nfsserver.service -install -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/nfs.service -install -D -m 644 %{SOURCE17} %{buildroot}%{_unitdir}/nfs-server.service.d/nfsserver.conf -install -D -m 644 %{SOURCE18} %{buildroot}%{_unitdir}/nfs-client.target.d/nfs.conf find %{buildroot} -type f -name '*.la' -delete -print install -D -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/nfs-mountd.service.d/options.conf install -D -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/nfs-server.service.d/options.conf @@ -201,9 +193,7 @@ install -D -m 644 %{SOURCE24} %{buildroot}%{_unitdir}/rpc-statd-notify.service.d install -D -m 644 %{SOURCE25} %{buildroot}%{_unitdir}/rpc-svcgssd.service.d/options.conf install -D -m 644 %{SOURCE26} %{buildroot}%{_sysconfdir}/nfs.conf install -D -m 644 %{SOURCE27} %{buildroot}%{_prefix}/lib/tmpfiles.d/nfs-kernel-server.conf -ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcnfsserver ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcnfs-server -ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcnfs ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcnfs-client # sysconfig-data mkdir -p %{buildroot}%{_fillupdir} @@ -228,7 +218,7 @@ chmod 644 %{buildroot}%{_sbindir}/{mountstats,nfsiostat} /usr/bin/getent passwd statd >/dev/null || \ /usr/sbin/useradd -r -c 'NFS statd daemon' \ -s /sbin/nologin -d %{_localstatedir}/lib/nfs -g nogroup statd -%service_add_pre nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service +%service_add_pre auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service %post -n nfs-client chown statd:nogroup %{_localstatedir}/lib/nfs > /dev/null 2>&1 || : @@ -248,23 +238,23 @@ fi # %set_permissions /sbin/mount.nfs /sbin/ldconfig -%service_add_post nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service +%service_add_post auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service %preun -n nfs-client -%service_del_preun nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service +%service_del_preun auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service %postun -n nfs-client /sbin/ldconfig -%service_del_postun nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service +%service_del_postun auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service rpc-svcgssd.service %verifyscript -n nfs-client %verify_permissions -e /sbin/mount.nfs %pre -n nfs-kernel-server -%service_add_pre nfsserver.service nfs-svcgssd.service nfs-mountd.service nfs-server.service +%service_add_pre nfs-svcgssd.service nfs-mountd.service nfs-server.service %preun -n nfs-kernel-server -%service_del_preun nfsserver.service nfs-svcgssd.service nfs-mountd.service nfs-server.service +%service_del_preun nfs-svcgssd.service nfs-mountd.service nfs-server.service %post -n nfs-kernel-server ### migrate from /var/lock/subsys @@ -276,12 +266,12 @@ if [ -f %{_localstatedir}/lock/subsys/nfsserver-rpc.idmapd ]; then mv %{_localstatedir}/lock/subsys/nfsserver-rpc.idmapd /run/nfs fi ### -%service_add_post nfsserver.service nfs-mountd.service nfs-server.service +%service_add_post nfs-mountd.service nfs-server.service %tmpfiles_create nfs-kernel-server.conf %set_permissions /var/lib/nfs/rmtab %postun -n nfs-kernel-server -%service_del_postun nfsserver.service nfs-mountd.service nfs-server.service +%service_del_postun nfs-mountd.service nfs-server.service %verifyscript -n nfs-kernel-server %verify_permissions -e /var/lib/nfs/rmtab @@ -300,7 +290,6 @@ fi %attr(0755,root,root) %{_sbindir}/nfsiostat %{_sbindir}/nfsidmap %{_sbindir}/nfsstat -%{_sbindir}/rcnfs %{_sbindir}/rcnfs-client %{_sbindir}/rpc.gssd %{_sbindir}/rpc.idmapd @@ -327,9 +316,6 @@ fi %{_unitdir}/rpc-svcgssd.service %{_unitdir}/rpc-svcgssd.service.d %{_unitdir}/var-lib-nfs-rpc_pipefs.mount -%{_unitdir}/nfs.service -%dir %{_unitdir}/nfs-client.target.d -%{_unitdir}/nfs-client.target.d/nfs.conf %dir /usr/lib/systemd/system-generators /usr/lib/systemd/system-generators/nfs-server-generator /usr/lib/systemd/system-generators/rpc-pipefs-generator @@ -374,11 +360,8 @@ fi %{_unitdir}/nfs-server.service %{_unitdir}/nfs-server.service.d %{_unitdir}/proc-fs-nfsd.mount -%{_unitdir}/nfsserver.service -%{_unitdir}/nfs-server.service.d/nfsserver.conf %{_prefix}/lib/tmpfiles.d/nfs-kernel-server.conf %{_sbindir}/exportfs -%{_sbindir}/rcnfsserver %{_sbindir}/rcnfs-server %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd diff --git a/nfs.service b/nfs.service deleted file mode 100644 index ad879f7..0000000 --- a/nfs.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Alias for NFS client -# The systemd alias mechanism (using symlinks) isn't rich enough. -# If you "systemctl enable" an alias, it doesn't enable the -# target. -# This service file creates a sufficiently rich alias for nfs-client -# (which is the canonical upstream name) -# "start", "stop", "restart", "reload" on this will do the same to nfs-client. -# "enable" on this will only enable this service, but when it starts, that -# starts nfs-client, so it is effectively enabled. -# nfs-server.d/nfsserver.conf is part of this service. - -Requires= nfs-client.target -PropagatesReloadTo=nfs-client.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/bin/true - -[Install] -WantedBy=multi-user.target - diff --git a/nfsserver.service b/nfsserver.service deleted file mode 100644 index 028cfdc..0000000 --- a/nfsserver.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=Alias for NFS server -# The systemd alias mechanism (using symlinks) isn't rich enough. -# If you "systemctl enable" an alias, it doesn't enable the -# target. -# This service file creates a sufficiently rich alias for nfs-server -# (which is the canonical upstream name) -# "start", "stop", "restart", "reload" on this will do the same to nfs-server. -# "enable" on this will only enable this service, but when it starts, that -# starts nfs-server, so it is effectively enabled. -# nfs-server.d/nfsserver.conf is part of this service. - -Requires= nfs-server.service - -[Service] -Type=oneshot -ExecStart=/bin/true -RemainAfterExit=yes -# Can't just PropagatesReloadTo to nfs-server.service -# as reload fails if we don't have our own ExecReload -# So copy that from nfs-server.service -ExecReload=/usr/sbin/exportfs -r - -[Install] -WantedBy=multi-user.target -