summaryrefslogtreecommitdiff
path: root/packaging/RedHat
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-07-10 01:26:16 +0000
committerJeremy Allison <jra@samba.org>2001-07-10 01:26:16 +0000
commit57e1f9aac3791fe659448a73f69178f5722d09c8 (patch)
tree807ce9aa395f45adfbd1879fa97f87dc8a9776e4 /packaging/RedHat
parent6da440c20a0a1796eea8e197a6568b292f1a1158 (diff)
downloadsamba-57e1f9aac3791fe659448a73f69178f5722d09c8.tar.gz
Move tdb files from /var/lock/samba to /var/cache/samba.
Jeremy.
Diffstat (limited to 'packaging/RedHat')
-rw-r--r--packaging/RedHat/samba2.spec.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index d8fff274f8a..4f23a72112b 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -295,6 +295,44 @@ if [ -f /etc/smbpasswd ]; then
mv /etc/smbpasswd /etc/samba/smbpasswd
fi
+#
+# For 2.2.1 we move the tdb files from /var/lock/samba to /var/cache/samba
+# to preserve across reboots.
+#
+echo "Moving tdb files in /var/lock/samba/*.tdb to /var/cache/samba/*.tdb"
+for i in /var/lock/samba/*.tdb
+do
+if [ -f $i ]; then
+ newname=`echo $i | sed -e's/lock/cache/'`
+ echo "Moving $i to $newname"
+ mv $i $newname
+fi
+
+# Remove the transient tdb files.
+if [ -e /var/cache/samba/brlock.tdb ]; then
+ rm -f /var/cache/samba/brlock.tdb
+fi
+
+if [ -e /var/cache/samba/unexpected.tdb ]; then
+ rm -f /var/cache/samba/unexpected.tdb
+fi
+
+if [ -e /var/cache/samba/connections.tdb ]; then
+ rm -f /var/cache/samba/connections.tdb
+fi
+
+if [ -e /var/cache/samba/locking.tdb ]; then
+ rm -f /var/cache/samba/locking.tdb
+fi
+
+if [ -e /var/cache/samba/messages.tdb ]; then
+ rm -f /var/cache/samba/messages.tdb
+fi
+
+if [ -d /var/lock/samba ]; then
+ rm -rf /var/lock/samba
+fi
+
# Add swat entry to /etc/services if not already there.
if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services