summaryrefslogtreecommitdiffstats
path: root/profile
diff options
context:
space:
mode:
authorMatthew Lemon <chaffinach+git@protonmail.ch>2022-05-02 20:19:33 +0100
committerMatthew Lemon <chaffinach+git@protonmail.ch>2022-05-02 20:19:33 +0100
commit36d22ff490d1951937841bf9fb9727da410b43a5 (patch)
tree2788e75d5d39be6926c6b7be8bfdbbd623a8b7cc /profile
parent433757bf898f65009cb9d62497d7fda3e0a504a2 (diff)
adding some niceties for openbsd 2022
Diffstat (limited to 'profile')
-rw-r--r--profile26
1 files changed, 24 insertions, 2 deletions
diff --git a/profile b/profile
index f363b6e..bd58714 100644
--- a/profile
+++ b/profile
@@ -2,6 +2,28 @@
#
# sh/ksh initialization
-PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
-export PATH HOME TERM
+{ # from https://github.com/terminalforlife config
+ # The RHEL recommended umask for much more safety when creating new files
+ # and directories. This is the equivalent of octal 700 and 600 for
+ # directories and files, respectively; drwx------ and -rw-------.
+ umask 0077
+
+ # Set up the SSH agent for key management.
+ if eval `ssh-agent -s`; then
+ # Only want to add keys on an SSH client, not the server.
+ if [ "$HOSTNAME" == 'x1bsd.my.domain' ]; then
+ [ -z "$SSH_TTY" ] && ssh-add "$HOME"/.ssh/id_rsa
+ fi
+ trap 'kill $SSH_AGENT_PID' EXIT
+ fi
+
+ . "$HOME"/.bashrc
+
+ PATH+=":$HOME/bin"
+} &> /dev/null
+
+
+#PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
+PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games
+export PATH HOME
export ENV=$HOME/.kshrc