aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2018-03-07 14:41:03 +0200
committerTony Sarajärvi <tony.sarajarvi@qt.io>2018-03-19 11:56:50 +0000
commit4492fd3268e575dc79d77105821839631aac998f (patch)
tree9ae53512014752fd66f99b3cddf17bf9d24e30a9 /coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh
parent5d7972b73b695e390b9bd3d82d7b6089b2ce84a2 (diff)
Remove try_catch codes from Ubuntu 16.04 scripts
Change-Id: I4a377b8bc2a16d9b9c4123a9a4f623f1a6a7ae18 Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh')
-rwxr-xr-xcoin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh80
1 files changed, 18 insertions, 62 deletions
diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh
index e00e2498..119a1008 100755
--- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh
+++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh
@@ -37,69 +37,25 @@
set -ex
-source "${BASH_SOURCE%/*}/../common/unix/try_catch.sh"
source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh"
NTS_IP=10.212.2.216
-ExceptionGsettings1=100
-ExceptionGsettings2=101
-ExceptionGsettings3=102
-ExceptionNTS=103
-ExceptionProxy=104
-ExceptionGrub=105
-
-try
-(
- echo "Set timezone to UTC."
- sudo timedatectl set-timezone Etc/UTC || throw $ExceptionTimezone
- echo "Timeout for blanking the screen (0 = never)"
- gsettings set org.gnome.desktop.session idle-delay 0 || throw $ExceptionGsettings1
- echo "Prevents screen lock when screesaver goes active."
- gsettings set org.gnome.desktop.screensaver lock-enabled false || throw $ExceptionGsettings2
- echo "Disable questions on shutdown."
- gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true || throw $ExceptionGsettings3
- echo "Set grub timeout to 0"
- sudo sed -i 's|GRUB_TIMEOUT=10|GRUB_TIMEOUT=0|g' /etc/default/grub || throw $ExceptionGrub
- sudo update-grub || throw $ExceptionGrub
-
- echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
- echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts || throw $ExceptionNTS
-
- if [ "$http_proxy" != "" ]; then
- echo "Acquire::http::Proxy \"$proxy\";" | sudo tee -a /etc/apt/apt.conf || throw $ExceptionProxy
- fi
-)
-catch || {
- case $ex_code in
- $ExceptionTimezone)
- echo "Failed to set timezone to UTC"
- exit 1;
- ;;
- $ExceptionGsettings1)
- echo "Failed to disable black screen."
- exit 1;
- ;;
- $ExceptionGsettings2)
- echo "Failed to prevent screen lock."
- exit 1;
- ;;
- $ExceptionGsettings3)
- echo "Failed to disable questions on shutdown."
- exit 1;
- ;;
- $ExceptionGrub)
- echo "Failed to set grub timeout."
- exit 1;
- ;;
- $ExceptionNTS)
- echo "Failed to set network teset server address into /etc/hosts."
- exit 1;
- ;;
- $ExceptionProxy)
- echo "Failed to set proxy /etc/apt/apt.conf."
- exit 1;
- ;;
- esac
-}
-
+echo "Set timezone to UTC."
+sudo timedatectl set-timezone Etc/UTC
+echo "Timeout for blanking the screen (0 = never)"
+gsettings set org.gnome.desktop.session idle-delay 0
+echo "Prevents screen lock when screesaver goes active."
+gsettings set org.gnome.desktop.screensaver lock-enabled false
+echo "Disable questions on shutdown."
+gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true
+echo "Set grub timeout to 0"
+sudo sed -i 's|GRUB_TIMEOUT=10|GRUB_TIMEOUT=0|g' /etc/default/grub
+sudo update-grub
+
+echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
+echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts
+
+if [ "$http_proxy" != "" ]; then
+ echo "Acquire::http::Proxy \"$proxy\";" | sudo tee -a /etc/apt/apt.conf
+fi