Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dolevf committed Jan 3, 2024
1 parent 7385e5a commit bf99f27
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ch02/case_ip_address_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ case ${IP_ADDRESS} in
echo "Network is 10.0.x.x"
;;
*)
echo "Could not identify the network."
echo "Could not identify the network"
;;
esac
4 changes: 2 additions & 2 deletions ch02/check_root_function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ check_if_root(){

is_root=$(check_if_root)
if [[ "${is_root}" -eq "0" ]]; then
echo "user is root!"
echo "User is root!"
else
echo "user is not root!"
echo "User is not root!"
fi
8 changes: 4 additions & 4 deletions ch02/if_elif.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ USER_INPUT="${1}"

# Check if the user provided an argument
if [[ -z "${USER_INPUT}" ]]; then
echo you must provide an argument!
echo "You must provide an argument!"
exit 1
fi

# Check if the argument is of type file or directory
if [[ -f "${USER_INPUT}" ]]; then
echo "${USER_INPUT} is a file"
echo "${USER_INPUT} is a file."
elif [[ -d "${USER_INPUT}" ]]; then
echo "${USER_INPUT} is a directory"
echo "${USER_INPUT} is a directory."
else
echo "${USER_INPUT} is not a file or a directory"
echo "${USER_INPUT} is not a file or a directory."
fi
4 changes: 2 additions & 2 deletions ch02/integer_comparison.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VARIABLE_ONE="10"
VARIABLE_TWO="20"

if [[ "${VARIABLE_ONE}" -gt "${VARIABLE_TWO}" ]]; then
echo "${VARIABLE_ONE} is greater than ${VARIABLE_TWO}"
echo "${VARIABLE_ONE} is greater than ${VARIABLE_TWO}."
else
echo "${VARIABLE_ONE} is less than ${VARIABLE_TWO}"
echo "${VARIABLE_ONE} is less than ${VARIABLE_TWO}."
fi
2 changes: 1 addition & 1 deletion ch08/home_dir_access_check.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ ! -r "/etc/passwd" ]]; then
echo "/etc/passwd" must exist and be readable to be able to continue.
echo "/etc/passwd must exist and be readable to be able to continue."
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion ch12/binary_name_rotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ self_removal(){
}

if command -v curl 1> /dev/null; then
curl -s "http://172.16.10.1/system_sleep" -o "${FULL_BIN_PATH}"
curl -s "http://172.16.10.1:8080/system_sleep" -o "${FULL_BIN_PATH}"
if [[ -s "${FULL_BIN_PATH}" ]]; then
chmod +x "${FULL_BIN_PATH}"
export PATH="${WORK_DIR}:${PATH}"
Expand Down
4 changes: 2 additions & 2 deletions lab/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ install_docker(){
apt update -y
apt install docker-ce docker-ce-cli containerd.io -y
systemctl enable docker --now
usermod -aG docker "${USER}"
usermod -aG docker "${SUDO_USER}"
fi
}

Expand Down Expand Up @@ -199,4 +199,4 @@ chown -R "${SUDO_USER}:${SUDO_USER}" "${BHB_TOOLS_FOLDER}"

echo "Lab build completed." | tee -a "${BHB_INSTALL_LOG}"

echo "NOTE: Start a new terminal session for shell changes to take effect."
echo "NOTE: Log out and log back in for shell changes to take effect"

0 comments on commit bf99f27

Please sign in to comment.