MT#11063 Sync with bootenv: use DEBIAN_REPO for installing augeas-tools

Change-Id: Ib36a15090e4d7a97e217e30b829cbd43ed513791
changes/18/818/3
Victor Seva 10 years ago
parent 45ef9ed362
commit b5d8ef7dfd

@ -245,12 +245,24 @@ install_vbox_package() {
ensure_augtool_present() {
if [ -x /usr/bin/augtool ] ; then
echo "/usr/bin/augtool is present, nothing to do"
else
echo "augtool isn't present, installing augeas-tools package:"
apt-get update
DEBIAN_FRONTEND='noninteractive' apt-get -y install augeas-tools
return 0
fi
echo "augtool isn't present, installing augeas-tools package:"
local TMPDIR=$(mktemp -d)
mkdir -p "${TMPDIR}/etc/preferences.d" "${TMPDIR}/statedir/lists/partial" \
"${TMPDIR}/cachedir/archives/partial"
echo "deb http://${DEBIAN_REPO_HOST}/debian/ wheezy main" > \
"${TMPDIR}/etc/sources.list"
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
-o dir::state="${TMPDIR}/statedir" -o dir::etc="${TMPDIR}/etc" \
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" update
DEBIAN_FRONTEND='noninteractive' apt-get -o dir::cache="${TMPDIR}/cachedir" \
-o dir::etc="${TMPDIR}/etc" -o dir::state="${TMPDIR}/statedir" \
-o dir::etc::trustedparts="/etc/apt/trusted.gpg.d/" \
-y --no-install-recommends install augeas-tools
}
### }}}

Loading…
Cancel
Save