From 6fcc0179c55b2eef87c4c923a8b198b38121f09c Mon Sep 17 00:00:00 2001 From: vponomaryov Date: Tue, 19 Jan 2016 18:53:18 +0200 Subject: [PATCH] Install vim text editor Manila service image has old "vi" that provides very narrow set of functionality. So, install better text editor - "vim". Change-Id: I06443c7c9a3585c65b58b20919eb63727ffbeb62 Closes-Bug: #1535807 --- .../post-install.d/50-update-vim-config | 17 +++++++++++++++++ .../pre-install.d/00-install-required-packages | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 elements/manila-ubuntu-core/post-install.d/50-update-vim-config diff --git a/elements/manila-ubuntu-core/post-install.d/50-update-vim-config b/elements/manila-ubuntu-core/post-install.d/50-update-vim-config new file mode 100755 index 0000000..41f4985 --- /dev/null +++ b/elements/manila-ubuntu-core/post-install.d/50-update-vim-config @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Add useful config options for vim config +vim_config="/etc/vim/vimrc" +echo "set hls is" >> $vim_config +echo "set tabstop=4" >> $vim_config +echo "set shiftwidth=4" >> $vim_config +echo "set expandtab" >> $vim_config +echo "set nu" >> $vim_config +echo "set background=dark" >> $vim_config +echo "set cc=80" >> $vim_config diff --git a/elements/manila-ubuntu-core/pre-install.d/00-install-required-packages b/elements/manila-ubuntu-core/pre-install.d/00-install-required-packages index 4958ee1..a616826 100755 --- a/elements/manila-ubuntu-core/pre-install.d/00-install-required-packages +++ b/elements/manila-ubuntu-core/pre-install.d/00-install-required-packages @@ -10,4 +10,10 @@ sudo sed -i -E "s/#\s(deb.+universe)$/\1/g" /etc/apt/sources.list apt-get update apt-get upgrade -y -apt-get install python sudo openssh-server rpcbind -y +apt-get install \ + python \ + sudo \ + openssh-server \ + rpcbind \ + vim \ + -y