From 1903f0e5f090a627b704deb2891f23a7859f8e5a Mon Sep 17 00:00:00 2001 From: Aditya Date: Sat, 14 Jan 2023 21:51:13 +0530 Subject: [PATCH] Add 9.7 - Add shell startup file --- scripts/chapter9/9.7-shell-startup.sh | 9 +++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 scripts/chapter9/9.7-shell-startup.sh diff --git a/scripts/chapter9/9.7-shell-startup.sh b/scripts/chapter9/9.7-shell-startup.sh new file mode 100644 index 0000000..d99fd4d --- /dev/null +++ b/scripts/chapter9/9.7-shell-startup.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +cat > /etc/profile << "EOF" +# Begin /etc/profile + +export LANG=en_IN.UTF-8 + +# End /etc/profile +EOF diff --git a/scripts/main.sh b/scripts/main.sh index 6bb5ad1..526e964 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1511,3 +1511,15 @@ then stop_script "chapter9/9.6-configure-sysvinit.sh" fi +# Chapter 9.7 +# =========== +echo "Configurintg shell startup files" +su -c "bash $SCRIPT/chapter9/9.7-shell-startup.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter9/9.7-shell-startup.sh" +fi +