Skip to content
Snippets Groups Projects
Commit b7febc7e authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed ev init step (refs #19005).

parent d9486dae
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ import utils ...@@ -8,7 +8,7 @@ import utils
def setup(interactive=True): def setup(interactive=True):
cmds = [ cmds = [
'apt-get update', 'apt-get update',
'apt-get install --yes make ipython ipython3 vim netcat git htop iotop bmon host lm-sensors munin munin-node pciutils ntp nfs-client smartmontools', 'apt-get install --yes make ipython ipython3 vim netcat git htop iotop bmon host lm-sensors munin munin-node pciutils ntp nfs-client smartmontools pwgen ntpdate',
'[ -f ~/.vimrc ] || echo "color ron" > ~/.vimrc', '[ -f ~/.vimrc ] || echo "color ron" > ~/.vimrc',
] ]
utils.run_commands(cmds) utils.run_commands(cmds)
......
...@@ -19,33 +19,36 @@ if ( ! test -z ${SHELL_UBICAST_PWD} ); then ...@@ -19,33 +19,36 @@ if ( ! test -z ${SHELL_UBICAST_PWD} ); then
fi fi
# create admin account # create admin account
useradd -m admin --shell /bin/bash useradd -m admin --shell /bin/bash
usermod -aG sudo admin usermod -aG sudo admin
if ( ! test -z ${SHELL_ADMIN_PWD} ); then if ( ! test -z ${SHELL_ADMIN_PWD} ); then
echo -e "${SHELL_ADMIN_PWD}\n${SHELL_ADMIN_PWD}" | passwd -q admin echo -e "${SHELL_ADMIN_PWD}\n${SHELL_ADMIN_PWD}" | passwd -q admin
fi fi
# migrate to Ubuntu 16.04 / apply sources.list # migrate to Ubuntu 16.04 / apply sources.list
if [ $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "=" '{print$2}') = "16.04" ] if ( cat /etc/lsb-release | grep '14.04' ); then
then # upgrade to Ubuntu 16.04
cp sources16.list /etc/apt/sources.list apt-get update
# Ubuntu 14.04 apt-get dist-upgrade -y
cp sources16.list /etc/apt/sources.list
apt-get update
DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get dist-upgrade -o Dpkg::Options::="--force-confold" --force-yes -y
apt-get install -f -y
else else
apt-get update && apt-get upgrade -y # Ubuntu 16.04
cp sources16.list /etc/apt/sources.list cp sources16.list /etc/apt/sources.list
apt-get update
DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get dist-upgrade -o Dpkg::Options::="--force-confold" --force-yes -y
fi fi
# màj # update
apt-get update && apt-get install -y aptitude && aptitude upgrade -y apt-get update
apt-get install -y aptitude
aptitude upgrade -y
aptitude install -y apt-transport-https pwgen ntpdate aptitude install -y apt-transport-https pwgen ntpdate
# modify sources.list to use ubicast cache # modify sources.list to use ubicast cache
grep ${APT_CACHE_HOST} /etc/apt/sources.list grep ${APT_CACHE_HOST} /etc/apt/sources.list
if [ $? = 1 ] if [ $? = 1 ]; then
then sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
fi fi
# APT panel # APT panel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment