From 1eb41df822d0684f2f97458231d492a86ae6f190 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 8 Mar 2025 20:24:10 -0700 Subject: [PATCH] Change parameter to not be an alias / function name. --- tasks/general/acct_mgmt/users.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 59df0c0..8255292 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -169,7 +169,7 @@ unset OPTIND unset accept - unset goodbye + unset shutdown unset only_sys unset only_flat @@ -178,7 +178,7 @@ h) echo -e "$usage" return 0 ;; y) accept="-y" ;; - g) goodbye="Y" ;; + g) shutdown="Y" ;; s) only_sys="Y" ;; f) only_flat="Y" ;; *) echo "ERROR: -$OPTARG is not a recognized option." >&2 @@ -193,7 +193,7 @@ {{ update_package_manager }} fi - if [[ "$goodbye" == "Y" && "{{ battery }}" == "True" ]]; then + if [[ "$shutdown" == "Y" && "{{ battery }}" == "True" ]]; then echo -e "\n*** Only System Updates - Skipping Flatpak ***\n\n" elif [[ "$only_sys" == "Y" ]]; then echo -e "\n*** Manually Skipping Flatpak ***\n\n" @@ -203,7 +203,7 @@ echo "*** Completed Successfully ***" - if [[ $goodbye == "Y" ]]; then + if [[ $shutdown == "Y" ]]; then shopt -s expand_aliases bye fi @@ -253,8 +253,12 @@ ' alias init-prog=init-program bye_aliases: | - alias bye="{{ shutdown_command }}" - alias goodbye="update -ysg" + function bye { + {{ shutdown_command }} + } + function goodbye { + update -ysg + } metasploit_aliases: | alias metasploit="msfconsole" alias hax="metasploit"