From 5b2231cf4f7b46b2cd883d15d34acec4db18cf56 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 18 Jan 2019 16:03:15 -0500 Subject: distro: use login(1) rather than /etc/init.sh. --- common/etc/init.sh | 23 ----------------------- distro/bash.cmd | 2 +- once/etc/init.sh | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) delete mode 100755 common/etc/init.sh create mode 100755 once/etc/init.sh diff --git a/common/etc/init.sh b/common/etc/init.sh deleted file mode 100755 index ab9b8d7..0000000 --- a/common/etc/init.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -cd / - -export HOME=/home/$(whoami) -export PATH=$HOME/.local/bin:/local/sbin:/local/bin:/sbin:/bin - -if [ "$TERM" = xterm ]; then - export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' -else - export PS1='\n\w \$ ' -fi - -if [ -x /bin/dircolors ]; then - alias ls='ls --color=auto' - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' diff --git a/distro/bash.cmd b/distro/bash.cmd index 2b580ec..69cd2c2 100755 --- a/distro/bash.cmd +++ b/distro/bash.cmd @@ -2,7 +2,7 @@ pushd "%~dp0" -start bin\ntctty.exe --sysroot %cd% --exec /bin/mintty -d --window max --exec /bin/bash --init-file /etc/init.sh -i +start bin\ntctty.exe --sysroot %cd% --exec /bin/mintty -d --window max --exec /bin/login -i midipix popd diff --git a/once/etc/init.sh b/once/etc/init.sh new file mode 100755 index 0000000..ab9b8d7 --- /dev/null +++ b/once/etc/init.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +cd / + +export HOME=/home/$(whoami) +export PATH=$HOME/.local/bin:/local/sbin:/local/bin:/sbin:/bin + +if [ "$TERM" = xterm ]; then + export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' +else + export PS1='\n\w \$ ' +fi + +if [ -x /bin/dircolors ]; then + alias ls='ls --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' -- cgit v1.2.3