diff --git a/image/templates/files/profile b/image/templates/files/profile new file mode 100644 index 0000000..269784c --- /dev/null +++ b/image/templates/files/profile @@ -0,0 +1,29 @@ +# The profile that all logins get before using their own .profile. + +trap "" 2 3 +export LOGNAME PATH + +if [ -z "$TERM" ]; then + export TERM=xterm +fi + +case "$0" in +-bash) + # set prompt for bash + PS1="\u@\h:\w\\$ " + export PS1 + ;; +esac + +case "$0" in +-sh | -ksh | -ksh93 | -jsh | -bash | -zsh) + if [ ! -f .hushlogin ]; then + # Allow the user to break the Message-Of-The-Day only. + trap "trap '' 2" 2 + /bin/cat -s /etc/motd + trap "" 2 + fi +esac + +umask 022 +trap 2 3 diff --git a/image/templates/sled/ramdisk-02-trim.json b/image/templates/sled/ramdisk-02-trim.json index 53dae70..f2a6530 100644 --- a/image/templates/sled/ramdisk-02-trim.json +++ b/image/templates/sled/ramdisk-02-trim.json @@ -108,6 +108,10 @@ "file": "/etc/motd", "src": "motd", "owner": "root", "group": "sys", "mode": "0644" }, + { "t": "ensure_file", + "file": "/etc/profile", + "src": "profile", + "owner": "root", "group": "sys", "mode": "0644" }, { "t": "ensure_file", "file": "/etc/system.d/zfs:dbuf",