#!/bin/sh # # set -e # this code is identical to the code in samba-libs.preinst # it is here to make sure that libpam-smbpass isn't upgraded in cases where # the samba-libs preinst would fail # if this code fails, the old version of libpam-smbpass will stay on the # system, and keep working (the 3.6 version of libpam-smbpass was # self-contained and doesn't need any shared libraries from other samba # packages) if [ "$1" = "upgrade" ] 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 libpam-smbpass 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