summaryrefslogtreecommitdiff
path: root/packaging/RedHat
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-12 17:48:19 +0000
committerGerald Carter <jerry@samba.org>2003-12-12 17:48:19 +0000
commit8230159871b0555f2fab415e9c9580738a4daa01 (patch)
tree3dced65e92d2ffc1f140b4468f4d5ae527818822 /packaging/RedHat
parent1f332e46380b2af33b3f6b0076799e6c7f016a05 (diff)
downloadsamba-8230159871b0555f2fab415e9c9580738a4daa01.tar.gz
samba-8230159871b0555f2fab415e9c9580738a4daa01.tar.bz2
samba-8230159871b0555f2fab415e9c9580738a4daa01.zip
fixing upgrade bug; fixing PAM config file install bug
(This used to be commit 46f8fe6848bddd5dfc4d8ee55f036d8e8ca620a4)
Diffstat (limited to 'packaging/RedHat')
-rw-r--r--packaging/RedHat/samba.spec.tmpl29
1 files changed, 25 insertions, 4 deletions
diff --git a/packaging/RedHat/samba.spec.tmpl b/packaging/RedHat/samba.spec.tmpl
index 550ab9304b..eb51d8b1a4 100644
--- a/packaging/RedHat/samba.spec.tmpl
+++ b/packaging/RedHat/samba.spec.tmpl
@@ -185,6 +185,9 @@ install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
+install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
+install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
# Remove "*.old" files
@@ -290,21 +293,37 @@ fi
# Add swat entry to xinetd.d if needed.
if [ -d /etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then
- install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/xinetd.d/swat
+ mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
+else
+ rm -f /etc/samba/samba.xinetd
fi
# Install the correct version of the samba pam file, depending on pam version.
# (always keep an existing PAM config file)
-if [ ! -f /etc/pam.d/samba ]; then
+if [ ! -f /lib/security/pam_stack.so ]; then
if [ -f /lib/security/pam_stack.so ]; then
echo "Installing stack version of /etc/pam.d/samba..."
- install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/pam.d/samba
+ mv /etc/samba/samba.stack /etc/pam.d/samba
else
echo "Installing non-stack version of /etc/pam.d/samba..."
- install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+ rm -f /etc/samba/samba.stack
fi
fi
+#
+# For 3.0.1 we move the tdb files from /var/cache/samba to /var/lib/samba
+#
+echo "Moving tdb files in /var/cache/samba/*.tdb to /var/lib/samba/*.tdb"
+for i in /var/cache/samba/*.tdb
+do
+if [ -f $i ]; then
+ newname=`echo $i | sed -e's|var\/lock\/samba|var\/lib\/samba|'`
+ echo "Moving $i to $newname"
+ mv $i $newname
+fi
+done
+
+
## call ldconfig to create the version symlink for libsmbclient.so
/sbin/ldconfig
@@ -439,6 +458,8 @@ fi
%config(noreplace) /etc/samba/lmhosts
%config(noreplace) /etc/samba/smb.conf
%config(noreplace) /etc/samba/smbusers
+/etc/samba/samba.stack
+/etc/samba/samba.xinetd
/etc/rc.d/init.d/smb
/etc/rc.d/init.d/winbind
/etc/logrotate.d/samba