summaryrefslogtreecommitdiff
path: root/debian/vyatta-bash.preinst
blob: ad37015f0b76909481ab6bbaf2aaeb7999f5b578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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