slish rev 3

Added tools directory (with the chroot login SHell)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jan 22 18:36:09 2014 +0100 (2014-01-22)
parents 103734990d08
children b2a0d6170736
files tools/slish.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/slish.sh	Wed Jan 22 18:36:09 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# SliSH users SHell - This tool is executed when a user is chrooted and
     1.7 +# must be installed into the SliSH chroot.
     1.8 +#
     1.9 +# Copyright (C) 2014 SliTaz GNU/Linux - BSD License
    1.10 +# Author: Christophe Lincoln <pankso@slitaz.org>
    1.11 +#
    1.12 +. /lib/libtaz.sh
    1.13 +
    1.14 +# Welcome
    1.15 +clear && colorize 36 "Welcome to your SliTaz SHell"
    1.16 +boldify $(date '+%a %b %d %Y - %H:%M')
    1.17 +newline
    1.18 +
    1.19 +# Set some env variables
    1.20 +PS1='\u@slish\e[0m:\e[1;34m\w\e[0m\$ '
    1.21 +PATH='/bin:/usr/bin'
    1.22 +HOME=/home/$USER
    1.23 +SHELL=/bin/sh
    1.24 +export PS1 PATH HOME SHELL
    1.25 +umask 0077
    1.26 +
    1.27 +# Chroot will drop user into /
    1.28 +cd ${HOME}
    1.29 +exec /bin/sh "$@"
    1.30 +