summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/vyatta-bash.preinst21
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