From: Michael Prokop Date: Thu, 2 Nov 2006 20:13:45 +0000 (+0100) Subject: another try to fix the smb.conf-diversion X-Git-Tag: 0.8-32 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=9830d0905474377b255bbf7d20f7d4ae8a258dbb;p=grml-etc.git another try to fix the smb.conf-diversion --- 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