summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-04 04:05:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:24 -0500
commit18800eab03b7b1c3cf6734b71f462f2fd7b8f24a (patch)
tree0ae87990e04faeb73ee01179e59b20e23cb41145 /packaging
parent6196446a03abeb4100bac1721977488ae5843f42 (diff)
downloadsamba-18800eab03b7b1c3cf6734b71f462f2fd7b8f24a.tar.gz
r13326: fix bad path in RHEL spec file; going to have to rebuild Fedora packages
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 9b2c3f3260e..f5cdb5b3160 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