slish view tools/slish.sh @ rev 11

Add slish to /etc/shells (used by dropbear) and some improvment
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 27 21:59:01 2014 +0100 (2014-01-27)
parents 2f91234fc15c
children
line source
1 #!/bin/sh
2 #
3 # SliSH users SHell - This tool is executed when a user is chrooted and
4 # must be installed into the SliSH chroot.
5 #
6 # Copyright (C) 2014 SliTaz GNU/Linux - BSD License
7 # Author: Christophe Lincoln <pankso@slitaz.org>
8 #
9 . /lib/libtaz.sh
11 # Welcome
12 clear && boldify "Welcome to your SliTaz SHell"
13 colorize 30 $(date '+%a %b %d %Y - %H:%M')
14 newline
15 echo "SliTaz : $(cat /etc/slitaz-release) ($(uname -sr))"
16 echo "Home : $(du -sh /home/$USER)"
17 newline
19 # Set some env variables
20 PS1='\u@slish\e[0m:\e[1;34m\w\e[0m\$ '
21 PATH='/bin:/usr/bin'
22 HOME=/home/$USER
23 SHELL=/bin/sh
24 EDITOR=nano
25 export PS1 PATH HOME SHELL EDITOR
26 #umask 0077
27 umask 0022
29 # Chroot will drop user into /
30 cd ${HOME}
31 exec /bin/sh "$@"