# HG changeset patch # User Christophe Lincoln # Date 1202857955 -3600 # Node ID a9d21a5548586812f4b36f704e064e2ca77ad098 # Parent 03c68ab3133cc28d61729d1dc4bcd7d479402fbf Add pkg slitaz-hacker (user hacker for LiveCD) diff -r 03c68ab3133c -r a9d21a554858 slitaz-hacker/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-hacker/receipt Wed Feb 13 00:12:35 2008 +0100 @@ -0,0 +1,52 @@ +# SliTaz package receipt. + +PACKAGE="slitaz-hacker" +VERSION="1.0" +CATEGORY="base-system" +SHORT_DESC="SliTaz user hacker." +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://www.slitaz.org/" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + # /home/hacker directories. + # + mkdir -p $fs/home/hacker/Documents \ + $fs/home/hacker/Downloads \ + $fs/home/hacker/Templates \ + $fs/home/hacker/.local/bin \ + $fs/home/hacker/.local/share + cp -a stuff/ash_history $fs/home/hacke/.ash_history + cp -a stuff/profile $fs/home/hacke/.profile +} + +pre_install() +{ + local root + root=$1 + # Go for echoing on configuration files if any hacker was found. + # + if ! grep -q hacker $root/etc/passwd; then + echo -n "Configuring $root/etc..." + echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd + echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow + echo 'hacker:x:500:' >> $root/etc/group + echo 'hacker:!::' >> $root/etc/gshadow + status + else + echo "Hacker is already in : $root/etc/passwd" + fi + # Hacker can listen to music + # + if grep -q audio $root/etc/group; then + if ! grep -q "audio:x:20:hacker" $root/etc/group; then + sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group + fi + fi + # Change permissions. + # + echo -n "Chmodig all files in /home/hacker..." + chown -R 500.500 $root/home/hacker + status +} diff -r 03c68ab3133c -r a9d21a554858 slitaz-hacker/stuff/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-hacker/stuff/README Wed Feb 13 00:12:35 2008 +0100 @@ -0,0 +1,8 @@ +README - slitaz-hacker (package) +================================================================================ + +slitaz-hacker package provide SHell profile and Ash history, creat a few +directories (done by the receipt) and configure system wide file such as +/etc/passwd or /etc/group. Note that some addfiles are installed for hacker +when the LiveCD flavor is generated, depending on the flavor packages list. + diff -r 03c68ab3133c -r a9d21a554858 slitaz-hacker/stuff/ash_history --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-hacker/stuff/ash_history Wed Feb 13 00:12:35 2008 +0100 @@ -0,0 +1,18 @@ +ls -al +cat /proc/cpuinfo +cat /proc/partitions +free +ifconfig -a +exit +tazpkg list +cat Images/ASCII/tux.txt +less -EM /usr/share/doc/tazpkg/tazpkg.txt +less -EM /usr/share/doc/slitaz/apropos.txt +nInvaders +htop +rhapsody +nano +retawq +retawq http://localhost/server-status +retawq http://localhost/ +clex diff -r 03c68ab3133c -r a9d21a554858 slitaz-hacker/stuff/profile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slitaz-hacker/stuff/profile Wed Feb 13 00:12:35 2008 +0100 @@ -0,0 +1,51 @@ +# ~/.profile: Executed by Bourne-compatible login SHells. +# + +# Path to personal scripts and executables (~/.local/bin). +# +if [ -d "$HOME/.local/bin" ] ; then + PATH=$HOME/.local/bin:$PATH + export PATH +fi + +# Java home directory path. +# +#JAVA_HOME=$HOME/Bin/jre1.6.0_03 +#JAVA_BINDIR=$JAVA_HOME/bin +#if [ -d "$HOME/Bin" ] ; then +# export PATH=$JAVA_BINDIR:$PATH +#fi + +# Environnement variables and prompt for Ash SHell +# or Bash. +# + +# Classic prompt. +PS1='\u@\h:\w\$ ' + +# Light green and blue colored prompt. +#PS1='\e[1;32m\u@\h\e[0m:\e[1;34m\w\e[0m\$ ' + +# Light blue or yellow. +#PS1='\e[1;34m\u@\h:\w\e[0m\$ ' +#PS1='\[\033[1;33m\]\u@\h:\w\[\033[0m\]\$ ' + +EDITOR='nano' +PAGER='less -EM' + +export PS1 EDITOR PAGER + +# Alias definitions. +# +alias df='df -h' +alias du='du -h' + +alias ls='ls -p' +alias ll='ls -l' +alias la='ls -la' + +# Avoid errors... use -f to skip confirmation. +alias rm='rm -i' +alias mv='mv -i' + +umask 022