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
def setup(interactive=True):
cmds = [
'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',
]
utils.run_commands(cmds)
......
......@@ -19,33 +19,36 @@ if ( ! test -z ${SHELL_UBICAST_PWD} ); then
fi
# create admin account
useradd -m admin --shell /bin/bash
useradd -m admin --shell /bin/bash
usermod -aG sudo admin
if ( ! test -z ${SHELL_ADMIN_PWD} ); then
echo -e "${SHELL_ADMIN_PWD}\n${SHELL_ADMIN_PWD}" | passwd -q admin
fi
# migrate to Ubuntu 16.04 / apply sources.list
if [ $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "=" '{print$2}') = "16.04" ]
then
cp sources16.list /etc/apt/sources.list
# Ubuntu 14.04
if ( cat /etc/lsb-release | grep '14.04' ); then
# upgrade to Ubuntu 16.04
apt-get update
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
apt-get update && apt-get 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
# Ubuntu 16.04
cp sources16.list /etc/apt/sources.list
fi
# màj
apt-get update && apt-get install -y aptitude && aptitude upgrade -y
# update
apt-get update
apt-get install -y aptitude
aptitude upgrade -y
aptitude install -y apt-transport-https pwgen ntpdate
# modify sources.list to use ubicast cache
grep ${APT_CACHE_HOST} /etc/apt/sources.list
if [ $? = 1 ]
then
sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
if [ $? = 1 ]; then
sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
fi
# 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