diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:31 +0000 |
commit | 236cb75e4430569627585a5818d9ce9bc85640f8 (patch) | |
tree | f84b5c0335eb76eb9df1e6c2c0004d7d9667c6e4 /debian/samba-libs.preinst | |
parent | Adding upstream version 2:4.17.12+dfsg. (diff) | |
download | samba-236cb75e4430569627585a5818d9ce9bc85640f8.tar.xz samba-236cb75e4430569627585a5818d9ce9bc85640f8.zip |
Adding debian version 2:4.17.12+dfsg-0+deb12u1.debian/2%4.17.12+dfsg-0+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/samba-libs.preinst')
-rw-r--r-- | debian/samba-libs.preinst | 45 |
1 files changed, 45 insertions, 0 deletions
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 |