summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian-unstable/samba.postinst
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-10-29 13:31:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:15 -0500
commit7ec71aa20d43fd45dd9321e42ada93ee10fd1d45 (patch)
tree829da267bc12da10dbdb2b3cf735d5de27639dd5 /packaging/Debian/debian-unstable/samba.postinst
parentfa75e8c1d482cdbad2ff074eccb2baf8d5bba856 (diff)
downloadsamba-7ec71aa20d43fd45dd9321e42ada93ee10fd1d45.tar.gz
samba-7ec71aa20d43fd45dd9321e42ada93ee10fd1d45.tar.bz2
samba-7ec71aa20d43fd45dd9321e42ada93ee10fd1d45.zip
r11398: Keep s3 in sync with trunk
(This used to be commit 7fc05b79643c93eaf0ef028a7337889ed21c52ba)
Diffstat (limited to 'packaging/Debian/debian-unstable/samba.postinst')
-rw-r--r--packaging/Debian/debian-unstable/samba.postinst6
1 files changed, 4 insertions, 2 deletions
diff --git a/packaging/Debian/debian-unstable/samba.postinst b/packaging/Debian/debian-unstable/samba.postinst
index 7b0bdd92ad..0fb03f8768 100644
--- a/packaging/Debian/debian-unstable/samba.postinst
+++ b/packaging/Debian/debian-unstable/samba.postinst
@@ -56,7 +56,8 @@ EOFMAGICNUMBER1234
# moving the files in the old directories (/var/samba/ and
# /var/state/samba) to the new FHS-compliant directories.
-if [ -d /var/samba/ ]; then
+if [ -d /var/samba/ ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.0.7-4
+then
mv /var/samba/* /var/lib/samba/ 2>/dev/null || true
rmdir /var/samba/
fi
@@ -64,7 +65,8 @@ fi
# Default for anything we don't know about (see next two 'for' loops)
# is /var/lib/samba -- guaranteed not to accidentally tromp on any
# files the admin thought were safe.
-if [ -d /var/state/samba ]; then
+if [ -d /var/state/samba ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.3-4
+then
mv /var/state/samba/* /var/lib/samba/ 2>/dev/null || true
rmdir /var/state/samba/