From 0a354ad0b2c9eaaa204c31db478da109dc6d2a8b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:02 +0200 Subject: Adding debian version 2:4.20.0+dfsg-1~exp1. Signed-off-by: Daniel Baumann --- debian/samba-libs.preinst | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 debian/samba-libs.preinst (limited to 'debian/samba-libs.preinst') diff --git a/debian/samba-libs.preinst b/debian/samba-libs.preinst new file mode 100644 index 0000000..accfe61 --- /dev/null +++ b/debian/samba-libs.preinst @@ -0,0 +1,45 @@ +#!/bin/sh +# +# + +set -e + +# Move files to private subdir now fhs patch is finally gone +if [ "$1" = "install" ] +then + for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb + do + if [ -e /var/lib/samba/$file ] + then + if [ -e /var/lib/samba/private/$file ] && + [ ! /var/lib/samba/$file -ef /var/lib/samba/private/$file ] + then + echo $file exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst + echo rename one of them to allow the install/upgrade to continue + echo http://bugs.debian.org/726472 + ls -al /var/lib/samba /var/lib/samba/private + exit 1 + fi + fi + done + for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb + do + if [ -e /var/lib/samba/$file ] + then + if ! [ -e /var/lib/samba/private/$file ] + then + if [ ! -d /var/lib/samba/private ] + then + mkdir /var/lib/samba/private + fi + mv /var/lib/samba/$file /var/lib/samba/private/$file + ln /var/lib/samba/private/$file /var/lib/samba/$file + fi + fi + done +fi + + +#DEBHELPER# + +exit 0 -- cgit v1.2.3