X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=debian%2Fpreinst;h=06a79170ec4661ad7fc8de8a5312ddbe05b10322;hb=007267fb430c8bcba8176e81f7f7a96015c9bad4;hp=64f5164fd91333ab077398221559ce080d08e648;hpb=b062a668547f5d896aa420f1a42c022f82085702;p=grml-etc-core.git diff --git a/debian/preinst b/debian/preinst index 64f5164..06a7917 100755 --- a/debian/preinst +++ b/debian/preinst @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Mär 21 19:03:31 CET 2007 [mika] +# Latest change: Sam Sep 15 10:36:46 CEST 2007 [mika] ################################################################################ set -e @@ -28,13 +28,14 @@ case "$1" in # we don't lose any files... for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \ /etc/zsh/zlogout /etc/vim/vimrc; do - [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$$" || /bin/true + [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || /bin/true + # [ -e "$file".dpkg-new ] && cp -f "$file".dpkg-new "${file}.tmp.$TMP" backup_conffile $file && \ [ -f "$file" ] && rm $file && \ dpkg-divert --quiet --add --rename --package grml-etc-core --divert "$file".original $file && \ [ -f "$file".dpkg-bak ] && mv -f "$file".dpkg-bak "$file" [ -f "$file".grml-etc-core ] && mv -f "$file".grml-etc-core "$file" - [ -e "${file}.tmp.$$" ] && mv -f "${file}.tmp.$$" "$file.original" + [ -e "${file}.tmp.$TMP" ] && mv -f "${file}.tmp.$TMP" "$file.original" # trying to overwrite `/etc/skel/.zshrc', which is also in package zsh # [ -f /etc/skel/.zshrc ] && \