X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpreinst;h=615ed55338ef17fdba13f78c84d5a7e5bce68e7d;hb=1038215c918fc3bcc695697321bcc638458bb9f6;hp=aaebc30ddfda7e3d10d9c082e098af402fe17d80;hpb=f4935d003256e973d6f192c392750f077339154a;p=grml-etc.git 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