From 716ac04c4fb8926c4f56269981a8a7fcb58e517b88ab0d2e89d06e6fd5d62ce3 Mon Sep 17 00:00:00 2001 From: Heath Petersen Date: Fri, 24 Jul 2026 13:56:54 -0500 Subject: [PATCH] changed to just replace skeletion .profile --- bootstrap.sh | 4 ++-- files/.profile | 34 ++++++++++++++++++++++++++++++++++ files/profile_append | 6 ------ 3 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 files/.profile delete mode 100644 files/profile_append diff --git a/bootstrap.sh b/bootstrap.sh index 008fd55..c994d8d 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -31,7 +31,7 @@ GIT_REPO_FILES="${GIT_REPO_BASE}/raw/branch/${GIT_REPO_BRANCH}/files" GIT_REPO_sudoers_d_hpf="${GIT_REPO_FILES}/sudoers_d_hpf" GIT_REPO_ansible_venv_sh="${GIT_REPO_FILES}/profile_d_ansible_venv_sh" -GIT_REPO_profile_append="${GIT_REPO_FILES}/profile_append" +GIT_REPO_profile="${GIT_REPO_FILES}/.profile" GIT_REPO_ansible_pull_sh="${GIT_REPO_FILES}/ansible_pull_sh" ETC_sudoers_d="/etc/sudoers.d" @@ -166,7 +166,7 @@ create_directory "${SKEL_profile_d}" "root:root" "u=rwx,go=" get_file "${GIT_REPO_ansible_venv_sh}" "${SKEL_ansible_venv_sh}" "root:root" "u=rwx,go=" # Get /etc/skel/.profile -get_file "${GIT_REPO_profile_append}" "${SKEL_profile}" "root:root" "u=rw,go=r" +get_file "${GIT_REPO_profile}" "${SKEL_profile}" "root:root" "u=rw,go=r" # Create the hpf-ans user system_useradd hpf-ans 800 diff --git a/files/.profile b/files/.profile new file mode 100644 index 0000000..c43f0ac --- /dev/null +++ b/files/.profile @@ -0,0 +1,34 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi + +if [ -d "$HOME/.profile.d" ] ; then + for profile_script in $HOME/.profile.d/*.sh ; do + . "${profile_script}" + done +fi + diff --git a/files/profile_append b/files/profile_append deleted file mode 100644 index dfa2c16..0000000 --- a/files/profile_append +++ /dev/null @@ -1,6 +0,0 @@ - -if [ -d "$HOME/.profile.d" ] ; then - for profile_script in $HOME/.profile.d/*.sh ; do - . "${profile_script}" - done -fi \ No newline at end of file