From 999964450261044de38e5e5b028be07101427e1a Mon Sep 17 00:00:00 2001 From: Aditya Date: Sat, 14 Jan 2023 21:56:44 +0530 Subject: [PATCH] Add 9.9 - Add /etc/shells --- scripts/chapter9/9.9-shells.sh | 11 +++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 scripts/chapter9/9.9-shells.sh diff --git a/scripts/chapter9/9.9-shells.sh b/scripts/chapter9/9.9-shells.sh new file mode 100644 index 0000000..f5fab70 --- /dev/null +++ b/scripts/chapter9/9.9-shells.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cat > /etc/shells.sh << "EOF" +# Begin /etc/shells + +/bin/sh +/bin/bash + +# End /etc/shells +EOF + diff --git a/scripts/main.sh b/scripts/main.sh index 87cd318..e579c59 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1535,3 +1535,15 @@ then stop_script "chapter9/9.8-inputrc.sh" fi +# Chapter 9.9 +# =========== +echo "Creating /etc/shells" +su -c "bash $SCRIPT/chapter9/9.9-shells.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter9/9.9-shells.sh" +fi +