From 9830d0905474377b255bbf7d20f7d4ae8a258dbb Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 2 Nov 2006 21:13:45 +0100 Subject: [PATCH] another try to fix the smb.conf-diversion --- debian/preinst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/preinst b/debian/preinst index aaebc30..615ed55 100755 --- a/debian/preinst +++ b/debian/preinst @@ -64,9 +64,9 @@ case "$1" in fi fi - # move files from package grml-etc to grml-etc-core / remove them at all + # move files from package grml-etc to grml-etc-core for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \ - /etc/zsh/zshrc /etc/zsh/zlogout /etc/vim/vimrc /etc/samba/smb.conf ; do + /etc/zsh/zshrc /etc/zsh/zlogout /etc/vim/vimrc ; do if dpkg-divert --list $file | grep -q 'grml-etc$' ; then rm_conffile $file dpkg-divert --quiet --package grml-etc --remove --rename --divert $file.original $file @@ -78,6 +78,11 @@ case "$1" in dpkg-divert --quiet --package grml-etc --remove --rename --divert /etc/skel/.zshrc.original /etc/skel/.zshrc fi + if dpkg-divert --list /etc/samba/smb.conf | grep -q 'grml-etc$' ; then + [ -f /etc/samba/smb.conf.original ] && rm /etc/samba/smb.conf.original + dpkg-divert --quiet --package grml-etc --remove --rename --divert /etc/samba/smb.conf.original /etc/samba/smb.conf + fi + ;; *) echo "preinst called with unknown argument $1" >&2 -- 2.1.4