From 077cc76f2a233211eeed262e7f55b0aba7dd6748 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Tue, 23 Jan 2018 15:40:17 +0100 Subject: [PATCH] Force tty and stop lightdm --- deploy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy.sh b/deploy.sh index 1ef59e2..8fa9fdc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,10 +1,18 @@ #!/bin/bash +if [ -z `tty | grep tty` ] +then + echo "This script should be run from tty" + echo "To start TTY please type Ctrl+Alt+F1" + exit 1 +fi read -p "This script should be run on Primtux to synchronise ldap do you want to continue [y/N]" ans if [ "$ans" != "y" ] then exit 1 fi +sudo dhclient eth0 sudo apt-get update +sudo systemctl stop lightdm sudo apt-get -y -q install libpam-ldap libnss-ldap nscd smbclient winbind cifs-utils libpam-mount ldap-utils kdm sudo apt-get purge lightdm # remove local users -- GitLab