diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-09-08 18:10:24 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-09-08 18:10:24 -0700 |
commit | bd951f510c072fa6945e5056ff35e81b665b7779 (patch) | |
tree | e138d5b36fc11af35b4055fabf2eb95645084ada | |
parent | 968f065cbd83b11d72271303245a6366bb96bbd4 (diff) | |
download | vyatta-bash-bd951f510c072fa6945e5056ff35e81b665b7779.tar.gz vyatta-bash-bd951f510c072fa6945e5056ff35e81b665b7779.zip |
fix for bug 6159
* divert bash_completion.sh so that completion scripts are only sourced once.
* also move /bin/sh diversion here (from ISO build).
-rw-r--r-- | debian/vyatta-bash.preinst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/vyatta-bash.preinst b/debian/vyatta-bash.preinst new file mode 100644 index 0000000..ad37015 --- /dev/null +++ b/debian/vyatta-bash.preinst @@ -0,0 +1,21 @@ +#! /bin/sh -e + +force_divert () +{ + dfile=$1 + dpkg-divert --remove $dfile || true + dpkg-divert --add $dfile || true + mv -f $dfile $dfile.distrib >/dev/null 2>&1 || true +} + +# remove dash's divert and create a "local" one +force_divert /bin/sh +ln -sf bash /bin/sh + +# divert /etc/profile.d/bash_completion.sh so the completion scripts don't +# get sourced twice. +force_divert /etc/profile.d/bash_completion.sh + +#DEBHELPER# + +exit 0 |