dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit bf6c591bec0e666a8a247b7302d33515ca2897ca
parent 14a45fc68b2d19612fccf6892fdf75f1de29f43c
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri,  9 Mar 2018 06:50:55 -0500

Fix edge case in shell initialization

In some cases the same shell will be symlinked in two directories and
(more importantly) will appear twice in /etc/shells. This fix
initializes the login shell to the first path listed in /etc/shells.

Diffstat:
M.local/bin/my-init | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.local/bin/my-init b/.local/bin/my-init @@ -162,7 +162,7 @@ fi for shell in zsh bash dash sh do - preferred_shell=`cat /etc/shells | grep /$shell$` + preferred_shell=`cat /etc/shells | grep /$shell$ | tr '\n' ' ' | cut -d ' ' -f 1` [ "$preferred_shell" = "" ] || break done if cat /etc/passwd | grep ^$LOGNAME.*$preferred_shell$ > /dev/null 2>&1