summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/RHEL/samba.spec.tmpl15
1 files changed, 12 insertions, 3 deletions
diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl
index 9b2c3f3260..f5cdb5b316 100644
--- a/packaging/RHEL/samba.spec.tmpl
+++ b/packaging/RHEL/samba.spec.tmpl
@@ -108,7 +108,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./configure \
--localstatedir=/var \
--with-configdir=%{_sysconfdir}/samba \
--with-libdir=%{_libdir}/samba \
- --with-lockdir=/var/cache/samba \
+ --with-lockdir=/var/lib/samba \
--with-logfilebase=/var/log/samba \
--with-mandir=%{_mandir} \
--with-piddir=/var/run \
@@ -167,7 +167,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{pam.d,logrotate.d}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/{samba,sysconfig}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
-mkdir -p $RPM_BUILD_ROOT/var/cache/samba/winbindd_privileged
+mkdir -p $RPM_BUILD_ROOT/var/lib/samba/winbindd_privileged
mkdir -p $RPM_BUILD_ROOT/var/{log,run/winbindd,spool}/samba
cd source
@@ -257,10 +257,19 @@ rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add smb
+## deal with an upgrade from a broken 3.0.21a.1 RPM
+if [ "$1" -eq "2" ]; then
+ if [ ! -d /var/lib/samba -a -d /var/cache/samba ]; then
+ mv /var/cache/samba/* /var/lib/samba/
+ rm -f /var/cache/samba
+ fi
+fi
+
+
%preun
if [ $1 = 0 ] ; then
/sbin/chkconfig --del smb
- rm -rf /var/log/samba/* /var/cache/samba/*
+ # rm -rf /var/log/samba/* /var/cache/samba/*
/sbin/service smb stop >/dev/null 2>&1
fi
exit 0