From 1ea193942f926218f3476942fcd8e3629d32d9d6 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 14 Nov 2017 17:38:35 +0100 Subject: [PATCH] support for /etc/exports generation --- libreschool-nfs.spec | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/libreschool-nfs.spec b/libreschool-nfs.spec index a951cc7..ea31e00 100644 --- a/libreschool-nfs.spec +++ b/libreschool-nfs.spec @@ -1,12 +1,3 @@ -%define distroversion 6.9 -%define distrorelease Final - -%define version 0.1.3 -%define release 1 -Version: %{version} -Release: %{release}%{?dist} - - Summary: LibreSchool NFS home profiles configuration Name: libreschool-nfs Version: 6.9 @@ -18,6 +9,7 @@ Source0: %{name}-%{version}.tar.gz Source1: COPYING URL: %{url_prefix}/%{name} Requires: libreschool-release +Requires: nethserver-directory Requires: nfs-utils BuildRequires: nethserver-devtools @@ -35,19 +27,12 @@ rm -rf $RPM_BUILD_ROOT %{genfilelist} $RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist - - -#nota bene: con la configurazione attuale, showmount non riporta nessun mount -#questo succede perche' showmount si appoggia a roba di NFS v2 e v3, mentre noi usiamo solo v4 e le porte per il resto sono chiuse di default - - %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %post chkconfig nfs on chkconfig rpcbind on -/sbin/service nfs start >/dev/null 2>&1 || : /sbin/e-smith/db configuration set nfs service \ status enabled \ TCPPort 2049 \ @@ -57,6 +42,22 @@ chkconfig rpcbind on TCPPort 111 \ UDPPort 111 \ access private +/sbin/e-smith/expand-template /etc/exports +/sbin/service nfs start >/dev/null 2>&1 || : +/sbin/service rpcbind start >/dev/null 2>&1 || : +/usr/sbin/exportfs -r +/sbin/e-smith/signal-event firewall-adjust +/usr/bin/ldapmodify -Y EXTERNAL -f /usr/share/libreschool-nfs/patch.ldif >/dev/null 2>&1 || : + +%postun +#if [ "$1" = 1 ]; then +# #upgrade +#fi +if [ "$1" = 0 ]; then + #uninstallation + /sbin/e-smith/expand-template /etc/exports + /usr/sbin/exportfs -r +fi %changelog * Sat Nov 4 2017 Paolo Asperti - 6.9-1